Does Solr have the equivalent of the "strict order" that the Sphinx has?

I choose between Solr and Sphinx.

The Sphinx document page has a β€œ5.3. Advanced Query Syntax” section that describes the following search options (among others):

  • strict order operator (example: aaa <bbb <ccc) -
  • NEAR, generalized proximity operator (example: hello NEAR / 3 world NEAR / 4 "my test") - search by distance between words
  • EXAMPLE / PARAGRAPH (example: "Bill Gates" PARAGRAPH "Steve Jobs") - search within a sentence / paragraph

Does Solr have any similar features?

0
source share
1 answer
  • Strict order operator: you will need to use SpanQueries for this, see enter the link description here to explain SpanQuery and to use them from Solr, you can try SurroundQParser or see this other question
  • NEAR, generalized proximity operator: yes, this is supported, see Proximate Search
  • INVITATION / PARAGRAPH: not directly. You can try several approaches:
    • Copy the map somehow into documents (and, perhaps, use the Combine in 4.0 function to link paragraph documents with parent documents, etc.)
    • Try to insert paragraph information with special tokens / spaces, see this
0
source

Source: https://habr.com/ru/post/1308219/


All Articles