0

I'm choosing between Solr and Sphinx.

Sphinx doc page has a section called "5.3. Extended query syntax" which describes the following search parameters (among others) :

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

Does Solr have any similar functionality?

4

1 に答える 1

0
  • strict order operator: you would need to use SpanQueries for this, look at enter link description here for an explanation of SpanQuery, and in order to use them from Solr, you could try SurroundQParser or else see this other question
  • NEAR, generalized proximity operator: yes, this is supported, see Proximity search
  • SENTENCE/PARAGRAPH: not directly. You could try several approaches:
    • Map somehow those to documents (and maybe use Join functionality in 4.0 to link Paragraph documents to parent documents etc)
    • Try to insert information about paragraphs with special tokens/gaps, see this
于 2012-08-03T20:11:05.197 に答える