Hi Team, We are exploring solr for one of our project as a search engine. It was a really a great tool around indexing and response time. While we are exploring we got the below questions and understandings. Kindly confirm the same.
We are actually trying to implement the search engine for a hierarchical search. (Tree structure). We have flatten our data structure and exported the data in to solr as solr is more meant for flat structure in terms of request and response Example 1 -----11-------------------------------111,112,113 ------12--------------121 ------13-----------------------------131,132,133 Our data structure will resemble something like the below and exported the same in Solr. Now when the customer enters the key for search, we need to search in the below structure. Each of the row in the below table corresponds to the each of the document in Solr. We were able to achieve this in the below structure but need to confirm on the below items. 1. Search the Level with the keyword and send only the parent and not the children of the node Example - if the user enters 12, then we need only 1,12 and not the children(ie 121) I assume we dont have a choice to achieve with Solr and we need to write a custom implementation for this. Correct me if i am wrong. 2. We need to do the distinct selection for each of the document. Example while if the search keyword is 11, then i should send 1,11(Kind of select distinct from sql Select distinct L1,L2)) I have read various forums on this and looks like we have options around facet, grouping. But not exactly the same which we are asking for similar to the Sql distinct. If we are not able to get the distinct results, how we will apply the pagination. Example - if the page size is 1 to 10, if we have 5 duplicate documents, then if we take a distinct of those, it might fail as still we have space for another 5 records. We understand faceting is arranging the results based on a faceted field rather than giving the results in the requested way. Please confirm of our understanding on the above options. Thanks Document structure below | L1 | L2 | L3 | | 1 | 11 | 111 | | 1 | 11 | 112 | | 1 | 11 | 113 | | 1 | 12 | 121 | | 1 | 13 | 131 | | 1 | 13 | 132 | | 1 | 13 | 133 |