A tattooed digital marketer. I love baseball, the Braves, coffee, and innovative thinking. I can always be found on twitter or at a local ball field. Active & always smiling Will has posted 50 posts at DZone. You can read more from them at their website. View Full User Profile

Grouping and Joining in Lucene / Solr

06.10.2012
| 4276 views |
  • submit to reddit

 



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.

Published at DZone with permission of its author, Will Soprano.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Tags:

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.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.