tags:

views:

53

answers:

3

Hi,all. I'm struggling with lucene and not sure how it's better to do: i've got users' data for their profiles - some of them(3-4 fields) are storing in lucene.But on query results i need also to show user's age/name/etc.

I don't think it's reasonable to save all of these fields(additional, which are not participate in the search process) in lucene, but querying rdmbs will either take some time, so my question is how it's better to do?

Thanks.

+1  A: 

Apart from taking more disk space, using "stored" field in the index does not impact performance of queries. I would go with that.

Pascal Dimassimo
+2  A: 

Indexing all profile fields with lucene gives better search experience to end users, as it will search over all fields and do appropriate ranking. In RDBMS, i dont know abt full text search over multiple columns and ranking. In such case i have always preferred Lucene.

you are also required to sync index with rdms.

Ankit Jain
it's true, but if a client want to search only on some of the profile fields, it's imho not reasonable to index _all of them. And it's not a problem to sync index with rdbms.
DCrystal
+1  A: 

This blog post tries to give you tools to choose between a full text search engine and a database. A compromise is to index all searchable fields and store an id you can use to retrieve a record from the database using a database key.

Yuval F
Thanks, i've chosen the same schema.
DCrystal