Page 1 of 1

Index need to rebuild

Posted: Tue Nov 13, 2012 7:01 pm
by Able-fans
I wrote a trigger to hide product once it's inventory level hit 0. This involves to update product's visibilityId. It works alright but it doesn't take the product off from website until I went to admin to rebuild indexes. Is there anyway I can rebuild index from my trigger so that no manual rebuilding needed.

Re: Index need to rebuild

Posted: Wed Nov 14, 2012 7:23 pm
by Able-fans
I don't believe I can rebuild indexes from trigger. I wondering if there is a way Ablecommerce can detect a product's visibility is changed from backend then it rebuild index itself?

Re: Index need to rebuild

Posted: Thu Nov 15, 2012 5:25 pm
by Able-fans
Can anyone answer this question? At lease your opinion if this is possible to be done or impossible. Or I did not make myself understand, if that's the case, I will explain in more detail. Thanks in advance

Re: Index need to rebuild

Posted: Fri Nov 16, 2012 7:00 am
by jmestep
It sounds like you did this outside of Able api code, so you could put code somewhere else in Able to trigger the index rebuild. I haven't looked at it, but if I were doing it, I would use the code that Able uses when you click the rebuild index button. If that isn't acceptable, then you could try Googling on Lucene. We're still learning about Lucene and search, but there is some info out there.

Re: Index need to rebuild

Posted: Fri Nov 16, 2012 9:54 am
by AbleMods
Completely hiding out-of-stock products is going to murder any hope of organic SEO on your website. I wouldn't recommend it.