My team and I are using analyzers both at search/query and when data is indexed.
After revewing the Elastic documentation and a few web searches, I have not found a conclusive answerto my questions. I have two questions please.
Question 1: Is there a difference, based on performance, between using an analyzer
at search/query time vs at index time?
Question 2: Is there a tool to measure the performance of analysis at search/query time vs at index time?
I assume the Query Profiler Tool can be used for search/query time analysis?
I am wondering why is this a concern? What analyzer are you using? Usually analysis is a very fast process. Also, it is common to use the same analyzer during indexing and search so that your documents are queries will match.
In some cases, for example for synonyms, it is enough to use a synonym analyzer only during indexing or during querying. But here a relevant consideration is not speed, but if you want your synonyms to be updateable.
This isn't a definitive answer, but they should be close. The thing you need to ask is do you want to pay the cost of the analysis at index or query time? Query time is likely to add extra latency in the request for the user.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.