lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joel Halbert <>
Subject Displaying search result data - stored fields vs external source
Date Tue, 15 Sep 2009 08:19:50 GMT

When using Lucene I always consider two approaches to displaying search
result data to users:

1. Store any fields that we index and display to users in the Lucene
Documents themselves. When we perform a search simply retrieve the data
to be displayed from the Lucence documents themselves.


2. Index fields in Lucene but reference data to be displayed from
another source, such as a database. So, when searching I would search
for documents then use a (stored) reference key on the documents to then
lookup the display fields to display from another source e.g. a

With regards to the number and size of stored fields I am looking at
indexing and displaying approximately 4 relatively small fields for each
document (e.g.  name, age, short description, URL ~ approx 500bytes in
total). In any query about 10 hits will be displayed to the user.
Approximately 10 million documents to index and search.

I am interested the differences in both approaches with regards to:

1) Indexing time performance (how long it might take to index with and
without stored fields)
2) Search time performance (total time taken to search for matching
documents and then display fields to users)

I am less interested in differences arising from
maintainability/increased storage requirements.

I would be interested to see what others  think of using each approach.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message