Explain between the two queries is identical:
9.180814 = fieldWeight(title:spanNot(ipad, black) in 531555), product of:
0.70710677 = tf(phraseFreq=0.5)
7.4192176 = idf(title: ipad=9370)
1.75 = fieldNorm(field=title, doc=531555)
SpanNotQueries in Lucene are working perfectly: spanNot(title:ipad,
title:black). I haven't traced through the code in ElasticSearch, but
the code seems to be creating the correct Lucene class. Anyone
successfully using SpanNotQuerys?
Explain between the two queries is identical:
9.180814 = fieldWeight(title:spanNot(ipad, black) in 531555), product of:
0.70710677 = tf(phraseFreq=0.5)
7.4192176 = idf(title: ipad=9370)
1.75 = fieldNorm(field=title, doc=531555)
SpanNotQueries in Lucene are working perfectly: spanNot(title:ipad,
title:black). I haven't traced through the code in Elasticsearch, but
the code seems to be creating the correct Lucene class. Anyone
successfully using SpanNotQuerys?
Slight error on my part. Without even realizing it, I was using a
custom query parser in Lucene that handled SpanNotQueries differently.
The queries work as expected in Elasticsearch, true to the Lucene
standard.
--
Ivan
On Tue, Aug 21, 2012 at 1:58 PM, Ivan Brusic ivan@brusic.com wrote:
Explain between the two queries is identical:
9.180814 = fieldWeight(title:spanNot(ipad, black) in 531555), product of:
0.70710677 = tf(phraseFreq=0.5)
7.4192176 = idf(title: ipad=9370)
1.75 = fieldNorm(field=title, doc=531555)
SpanNotQueries in Lucene are working perfectly: spanNot(title:ipad,
title:black). I haven't traced through the code in Elasticsearch, but
the code seems to be creating the correct Lucene class. Anyone
successfully using SpanNotQuerys?
I know this post is pretty old.
I am definitely puzzled with the gist that you provided.
Why is there 2 matches?
"exclude" : {
"span_term" : {
"field1" : "dog"
}
}
I though we should exclude match with dog...
Could you please point me to proper information to understand what is
happening?
Thx,
Jade
Le mercredi 22 août 2012 02:01:09 UTC-4, Ivan Brusic a écrit :
Slight error on my part. Without even realizing it, I was using a
custom query parser in Lucene that handled SpanNotQueries differently.
The queries work as expected in Elasticsearch, true to the Lucene
standard.
--
Ivan
On Tue, Aug 21, 2012 at 1:58 PM, Ivan Brusic <iv...@brusic.com
<javascript:>> wrote:
Explain between the two queries is identical:
9.180814 = fieldWeight(title:spanNot(ipad, black) in 531555), product
of:
0.70710677 = tf(phraseFreq=0.5)
7.4192176 = idf(title: ipad=9370)
1.75 = fieldNorm(field=title, doc=531555)
SpanNotQueries in Lucene are working perfectly: spanNot(title:ipad,
title:black). I haven't traced through the code in Elasticsearch, but
the code seems to be creating the correct Lucene class. Anyone
successfully using SpanNotQuerys?
Pretty old indeed. As explained briefly, I was migrating a Lucene system to
Elasticsearch and did not understand why the span not queries were not
working, only to discover we had a custom parser, to support syntaxes such
as the one you are expecting.
Span nots are tricky in Lucene, but basically you are looking for when
"dog" is not a near "quick" near a "dog". Sounds confusing because it is.
I noticed you +1 the pull request I submitted which will probably help your
use case. The code should work as is without a need to merge in the current
codebase, but I guess it would help. Stuck on a laptop with Java 6, so I
can no longer build Elasticsearch. Will try to find the time.
I know this post is pretty old.
I am definitely puzzled with the gist that you provided.
Why is there 2 matches?
"exclude" : {
"span_term" : {
"field1" : "dog"
}
}
I though we should exclude match with dog...
Could you please point me to proper information to understand what is
happening?
Thx,
Jade
Le mercredi 22 août 2012 02:01:09 UTC-4, Ivan Brusic a écrit :
Slight error on my part. Without even realizing it, I was using a
custom query parser in Lucene that handled SpanNotQueries differently.
The queries work as expected in Elasticsearch, true to the Lucene
standard.
--
Ivan
On Tue, Aug 21, 2012 at 1:58 PM, Ivan Brusic iv...@brusic.com wrote:
Explain between the two queries is identical:
9.180814 = fieldWeight(title:spanNot(ipad, black) in 531555), product
of:
0.70710677 = tf(phraseFreq=0.5)
7.4192176 = idf(title: ipad=9370)
1.75 = fieldNorm(field=title, doc=531555)
SpanNotQueries in Lucene are working perfectly: spanNot(title:ipad,
title:black). I haven't traced through the code in Elasticsearch, but
the code seems to be creating the correct Lucene class. Anyone
successfully using SpanNotQuerys?
I've pick you git push and integrated it into ElasticSearch source
tag:v1.3.5
After a rebuild, it seems to work perfectly (I am still trying to find the
maximum values for pre and post, no luck so far).
I've been able to figure out how span_not works with this post.
I add it here if someone else is looking to understand why the actual gist
return 2 results.
Yes, that post explained it a lot better than I wanted to. But basically
yes, the exclude portion is only as part of an existing span, but a single
span term is not really a span.
Ultimately, span queries are not very flexible since they do not analyze
terms, which is why I suspect there are rarely any questions about them
(and perhaps why my PR is in limbo). Phrase matches might work better, but
they do not support in order slop.
I've pick you git push and integrated it into Elasticsearch source
tag:v1.3.5
After a rebuild, it seems to work perfectly (I am still trying to find the
maximum values for pre and post, no luck so far).
I've been able to figure out how span_not works with this post.
I add it here if someone else is looking to understand why the actual gist
return 2 results.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.