0

Is there a way to tell SOLR to search for (for example) 80% of the phrase "term1 term2 term3 term4"

will yeild documents with at least 3 terms.

Extra question - if such logic exists - will it work with proximity : "term1 term2 term3 term4"~15

specifically, tried to do that with SOLR.NET

var queries = new List<ISolrQuery>();
//filling the list...

    new SolrMultipleCriteriaQuery(queries, SolrMultipleCriteriaQuery.Operator.OR);

when I ran that got SolrNet.Exceptions.InvalidFieldException

user1025852
  • 2,684
  • 11
  • 36
  • 58

2 Answers2

1

No, but you can find the query in such way:

text:(term1 term2 term3) OR text:(term1 term2 term4) OR text:(term1 term3 term4) OR text:(term2 term3 term4) 

The code to generate this kind of query is pretty simple

shem
  • 4,686
  • 2
  • 32
  • 43
  • yep, tried that with SOLR.NET - SolrMultipleCriteriaQuery - and got The remote server returned an error: (400) Bad Request. – user1025852 May 25 '15 at 12:51
  • So looks like it's just some kind of syntax error, try debugging the result query. but solr suppose to support this kind of query. – shem May 25 '15 at 13:05
1

When working with Solr directly, this is supported. I am not familiar with Solr.NET though, can anyone comment on whether this feature is supported by that client?

Community
  • 1
  • 1
Evan Haas
  • 2,524
  • 2
  • 22
  • 34
  • sounds like what I need - I'll check if that will work with tight phrase "...", and not just free clauses.. – user1025852 May 27 '15 at 13:35
  • followup question - I'd like it to work alongside with proximity - Field:"Term1 Term2 Term3 Term4"~10 (with mm=3) Meaning that find at least 3 terms with proximity 10 - I couldn't make it work... – user1025852 Jun 01 '15 at 07:25