Grouping and Joining in Lucene / Solr
The above video shows you the improved features of Solr and Lucene that allow you to join and group fields across documents while maintaining the power of Lucene's free text search.
In the real world data isn’t flat. Data is often modelled into complex models. Lucene is document oriented and doesn’t support relations natively. The only way you could index this data is by de-normalizing the relations in a document with many fields and execute subsequent queries. Subsequent queries can be expensive and data gets duplicated. This isn’t always ideal. Recently Solr and Lucene provide features that allow you to join and group. You can join and group on fields across documents and still have the power of Lucene’s awesome free text search. In this presentation, we’ll look at these new alternatives, the advantages and disadvantages and how these features can be utilized. how these new capabilities impact the design of Solr-based search applications primarily from infrastructure and operational perspectives.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)





Comments
Fahmeed Nawaz replied on Tue, 2012/06/12 - 10:35am
Hi
How can i write the code,if i want to query the records like this SQL below:
select * from things where name='a' or name='b'
I know that i should use '$or',but i'm puzzled by using it.