Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does SOLR support percolation

ElasticSearch has percolator for prospective search. Does SOLR have a similar feature where you define your query upfront? If not, is there an effective way of implementing this myself on top of the existing SOLR features?

like image 335
Pieter-Jan Avatar asked May 27 '15 04:05

Pieter-Jan


People also ask

What is Solr used for?

Solr is a search server built on top of Apache Lucene, an open source, Java-based, information retrieval library. It is designed to drive powerful document retrieval applications - wherever you need to serve data to users based on their queries, Solr can work for you.

What is the difference between Solr and Elasticsearch?

The main difference between Solr and Elasticsearch is that Solr is a completely open-source search engine. Whereas Elasticsearch though open source is still managed by Elastic's employees. Solr supports text search while Elasticsearch is mainly used for analytical querying, filtering, and grouping.

How can Solr query performance be improved?

The enableLazyFieldLoading setting allows Solr to load fields that are not directly requested later as needed. This can boost performance if most queries request only a small subset of fields. We recommend leaving the enableLazyFieldLoading with the default value of true.


2 Answers

besides what BunkerMentality said, it is not hard to build your own percolator, what you need:

  1. Are the queries you want to run easy to model on Lucene only syntax? if so you are good, if not, you need to convert them to Lucene only. Built them, and keep them in memory as Lucene queries
  2. When a doc arrives:
  3. build a MemoryIndex containing only that single doc
  4. run all your queries on the index

I have done this for a system ingesting millions docs a day and it worked fine.

like image 114
Persimmonium Avatar answered Oct 24 '22 20:10

Persimmonium


It's listed as an open new feature, SOLR-4587, on Solr JIRA but it doesn't seem like any work has started on it yet.

There is a link in the comments there to a separate project called Luwak that seems to implement some features similar to percolator.

like image 21
BunkerMentality Avatar answered Oct 24 '22 21:10

BunkerMentality