Export data during rebuilding SearchIndex

We have a Litium 7.3 Instance.
Our customer have ALOT off orders, we have built some custom widgets that select some dates and than after sends a request to backend and creating a SearchRequest against Orders.
The most normal one is 2 dates, from and to in Created date.

We have the problem that this search can take up to 20 minutes to run. And we starting to think that this is becuase its the same time the SearchIndex is rebuilding.

So my question is, what happens internally when I do a search in Litium and the searchindex is rebuilding, can this slow down the search or create timeouts or somehow give “corrupted data”.

//Andreas

Searchindex is using something that is named “write once files”, this make a search index write to a physical file only once and with next write a new file is created. This to avoid that the file that you currently read from are changed.

When the search is started the engine is open a reader to all the files that currently exist and making the search before returning the data and closing the files.

I have never seen that this search takes more than some second so if this is taking 20 minutes it sounds as an IO problem with the disc.

If the full operation from doing the actual search, fetching full entity and doing the calculation takes the 20 minutes it is possible that the code can be optimized to be executed faster.

This morning our searchindex was rebuilding, it takes between 45-60minutes and while this was rebuilding the customer now tried to run an export (a big search no Orders) the exported came out empty. We had 0 results (that is faulty)
Is there things we can do to speed up rebuild searchindex?

I think you need to explain your scenario in more details to be able to guide you in any direction. Directly I wounder why you are rebuilding the search index, search index is constantly updating itself and does not need to be rebuilt on a regular basis.

We have a customer who makes an export of orders every morning.
The export is used for order picking and sending products to customers.
The export is relying on Litium search index.
We had a problem that some orders did not show up in the export, which caused the delivery to customer to be delayed until the export next day.
Because of this we triggered rebuild of search index before every export, then all orders were included.

Could you use OrderViewFilteringInfo to get the data, instead of using the search?

This query will hit the database, but with parameters so you can limit what you are retrieving.

I don’t have an example for this, but there’s some useful information here:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.