andrewyakonyuk / Vault.App

http://vault-project.herokuapp.com/
0 stars 1 forks source link

Lucene.net #15

Open andrewyakonyuk opened 8 years ago

andrewyakonyuk commented 8 years ago

Tips for integrating Lucene.net into app

andrewyakonyuk commented 8 years ago

Official FAQ

Some additional tips:

Source

andrewyakonyuk commented 8 years ago

Syncing Lucene.net indexes across multiple app servers

Available options:

In general way, the most appropriate solution is storing copies of indexes on the both servers. But question is: what to do in case of multiple instances of the same app on the single server? Is the app needed create his own copy of indexes, because we cannot have two writers writing to the same location.

Multiple or single index in Lucene?

The app contains a multiple types of the content (article, audio, events, places etc) with different sets of fields. I am looking for best approach to store these types and searching them together. The most voted answer recommends to use the single index, but I am not entirely sure about that.

andrewyakonyuk commented 8 years ago

Lucene TermQuery and QueryParser

When you use QueryParser, it uses analyzer which does the same sequence of actions as when during the indexing (tokenization, lowercasing, stopwords, etc.).

When you use raw TermQuery, you need to do all these steps yourself.

I guess your analyzer does something special about Properties.LUCENE_APPARTMENT_ADDRESS and you are not when passing the address to TermQuery hence the search results discrepancy.