: > Testing pf2 and pf3. I thought that when using pf2=myfield, and q=foo 
: bar, you would get a phrase query "foo bar", but you don't, unless there 
: are at least 3 terms in the query. Is this intentional?
: 
: Nope.
: 
: > I think of "pf2" as boosting any two words in the query, even if there 
: are only two words.
: 
: Correct.

-0 ... getting "double the boosting" on the original query if you use 
both pf and pf2 smells weird to me in a way i can't fully describe, but i 
can certainly understand how the consistency would at least be easier to 
understand.

: Correct.  Looks like a bug probably introduced during a refactor
: (since I don't recall using the "shingle" terminology).

FWIW: i did the refactoring of that method and introduced those variables, 
but the same logic is in the original SOLR-1553 patch...

+        Map<String,Float> pf = phraseFields;
+        if (normalClauses.size() >= 2 && pf.size() > 0) {
+          StringBuilder sb = new StringBuilder();
+          for (int i=0; i<normalClauses.size()-1; i++) {
...
+        pf = phraseFields3;
+        if (normalClauses.size() >= 3 && pf.size() > 0) {
+          StringBuilder sb = new StringBuilder();
+          for (int i=0; i<normalClauses.size()-2; i++) {

...so it was't a bug introduced later, it was written out that way 
explicitly in the begining for some reason.


-Hoss

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to