I'm learning Apache Lucene and I've some queries regarding the performance of the index,
- I'm building an index based on the data in the database, the schema of the database is the schema of the Lucene Document.
- I have two options to respond back to searches. First is search the index and the respond the value with the index, else search the index, get the id(which is the primary key of the table) of the results and query the database. For the former I need to store the values of the table in the index so that I can retrieve the values using Index.Store.Yes, and for the latter its enough to index the data and not to store the data using Index.Store.No so the index will not be bigger.
- Will using the former technique will affect the performance(searching the index by storing all the values) or searching the index and querying the db (by storing all the values) will affect performance.
- Which is the best approach or is there are any other solutions to the above problem