I have two separate indices A and B. Both indices have same document structure.
Let's say A contains 50 documents and B contains 5 documents. When i search over these indices with limit 20, resultSet should contains 17 documents from A and 3 documents from B which meet searchCriteria. I want to limit document count from B indice . Everytime I search over these indices, it should return 3 documents or not from B indices.
I think you might need to come up with a more detailed description of how the sorting should work then just "well". There are several corner cases that you would need to figure out here. In any case I think you will have to use msearch to search both indices separately and combine results in your application based on your business logic of selecting records and your definition of correct sorting. Each record has an array of sort keys that were used to sort the records according to your rules.
I search with alias X on indices A and B . I just want to give max_doc_count= 5 for index B .
Search result should contains max 5 documents from index B . If documents from index B do not meet criteria then all result should contains documents from A. I should able to set size for query. Every time i want to retrieve 20 documents.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.