solr - Returning only specific rows (eg. every 10th: #1, #11, #21...) from query -


I need to bring only specific ones (like "inline rows") from the Solar Index. For example, if the full results are in 10000 rows, then I want to get only the first and last line of every 100 items bucket.

Item 1 and 100 items 101 and 200 items 201 and 300 ...

This group is dynamic and depends on the number of results. Therefore, if there are only 5000 total result rows, the bucket size is 50 instead of 100. I can calculate the actual indexes, but the problem is how they can be brought from solar.

No index can be used directly as query parameters. In practice, I am doing a search "starting with the name" (or some other letter) and I want to get the first item starting from A, starting from A, starting from A, 101 Th item ...

The query parameters are "rows" and "start" but these items can not be skipped, so I will need to get each item with a different query which is disabled. I was also thinking about implementing a filter query which could only filter items 2 ... 99, 199 ... 1 99 but I do not know how to apply it.

I do not know an easy way to do this, but this will reduce the amount of data, And will have to pass back: Tell a regular query to Solr to return the normal start and rows parameters, but only the ID field of each document In your client code, Store the ID of the first and last documents, and the next for start Repeat the query with the sector value. After reaching the end of the search results, you have a list of the document ID that you want. Run a new query and give it a list of the document ID that you want to return, and this time you get the whole document.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -