Hi,
If you are writing your queries programmatically, (without using a query
parser), nested proximity is possible with SpanQuery family. Actually there
exists surround query parser for this. Please see
o.a.lucene.queryparser.surround.parser.QueryParser
Proximity search uses position
Hi
I want to know how the proximity search in lucene works? Does lucene
supports the nested proximity search?
Thanks
Lokesh
You could insert a large position gap between sentences (say 100;
something larger than the largest sentence in #words), and a still
larger position gap between paragraphs (1000; larger than the largest para).
Then within-sentence search is just (A B)~100 and within-paragraph
search (A B)~1000
hlighting.
-Original Message-
From: Jigar Shah [mailto:jigaronl...@gmail.com]
Sent: Monday, April 07, 2014 3:47 AM
To: java-user@lucene.apache.org
Subject: Proximity Search for SENTENCE and PARAGRAPH
Hello all,
I need to implement 2 features in my application:
1. "Proximity fo
Hello all,
I need to implement 2 features in my application:
1. "Proximity for words and phrases within the same sentence"
2. "Proximity for words and phrases within the same paragraph"
Doing some research on internet if found following things.
There is "ProximityQueryNode" which has some enum
r. SurroundQueryParser
support nested proximity search.
It has operators for both unordered and ordered query.
Your query would be something like this:
(fear 2w dark) w (tight 3w free)
http://wiki.apache.org/solr/SurroundQueryParser
http://www.lucidimagination.com/blog/2009/02/22/exploring-query-parser
also PhraseQuery.setSlop(n). You could also look at the Span
> queries e.g. SpanNearQuery.
>
>
> --
> Ian.
>
>
> On Wed, Jul 25, 2012 at 6:13 AM, neerajshah84 <[hidden
> email]<http://user/SendEmail.jtp?type=node&node=3997169&i=0>>
> wrote:
>
> >
If you are using QueryParser use "fear dark"~2 "tight free"~3.
See also PhraseQuery.setSlop(n). You could also look at the Span
queries e.g. SpanNearQuery.
--
Ian.
On Wed, Jul 25, 2012 at 6:13 AM, neerajshah84 wrote:
> how can i put multiplue proximity search in lucen
how can i put multiplue proximity search in lucene??
example :-
i want to search like "fear,dark" in two words and dark adjucent to "tight"
and tight,free in 3 words.
Query :- fear2dark tight3free
how can i do this in lucene??
--
View this message in context:
htt
On Sat, May 26, 2012 at 12:07 PM, Chris Harris wrote:
>
> Alternatively, if you insist that query
>
> merger w/5 (medical and agreement)
>
> should match document "medical x x x merger x x x agreement"
>
> then you can propagate 2x the parent's slop value down to child queries.
This is in fact ex
In case it's of interest, I have a new approach I'm considering.
For the basic intuition, a colleague who works with some of the users
formulating these complicated queries proposed that
(merger and agreement) w/5 (medical and companion)
is approximately the same as
(merger w/5 agreement) w/5 (
You're right, those cases won't be covered, and probably can't be without some
hacking at the NearSpans* classes. The other niggle I've found is that it
doesn't play well with highlighting - you get the entire span highlighted,
rather than the individual terms within it.
For NOT WITHIN queries
First impression is, that's a reasonably clever way to get the user
intent basically right without having to add a new SpanQuery. Have you
come up with any edge cases where it could do something unexpected?
So far I've thought of one, though you could argue it has more to do
with the "minimum/lazy
I've just had to implement exactly this - the solution I came up with was to
translate:
A w/5 (B and C) -> SpanNear(A, spanNear(A, B, 5), spanNear(A, C, 5), 0)
A w/5 (B or C) -> OR(spanNear(A, B, 5), spanNear(A, C, 5))
More complex queries (such as (A AND B) w/5 (C AND D)) are dealt with by
app
It sounds me as if there could be a market for a new kind of query that
would implement:
A w/5 (B and C)
in the way that people understand it to mean - the same A near both B
and C, not just any A.
Maybe it's too hard to implement using rewrites into existing SpanQueries?
In term of the Pos
On Thu, May 17, 2012 at 7:11 AM, Chris Harris wrote:
> but also crazier ones, perhaps like
>
> agreement w/5 (medical and companion)
> (dog or dragon) w/5 (cat and cow)
> (daisy and (dog or dragon)) w/25 (cat not cow)
[skip]
Everything in your post matches our experience. We ended up writing
some
> medical w/5 agreement
> (medical w/5 agreement) and (doctor w/10 rights)
>
> but also crazier ones, perhaps like
>
> agreement w/5 (medical and companion)
> (dog or dragon) w/5 (cat and cow)
> (daisy and (dog or dragon)) w/25 (cat not cow)
This syntax reminds me Surround.
http://wiki.apache.o
I'm working on a product for librarians and similar people, who
apparently expect to be able to combine classic boolean operators
(i.e. AND, OR, NOT) with proximity operators (especially w/n and pre/n
-- which basically map to unordered and ordered SpanQueries with slop
n, respectively) in unrestri
Hi,
Is it possible to use proximity search together with StandardAnalyzer for
Chinese characters?
Regards
Wei jian
-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h
We are trying to do proximity search for multi-terms and we don't care
the order of the terms. Therefore "term1 term2"~5 probably will not
get you "term2 term1" if both terms are long. So instead of applying
distance at the end, we apply distance to each word, "term1
> Is there a minimum string length requirement for proximity search? For
> example, would "a~" or "an~" trigger proximity search? The result
> would be horrible if there is no such requirement.
>
> Thanks,
> Andy
>
> -
Is there a minimum string length requirement for proximity search? For
example, would "a~" or "an~" trigger proximity search? The result
would be horrible if there is no such requirement.
Thanks,
Andy
-
To
>
> Pierre
>
> -Message d'origine-
> De : Livia Hauser [mailto:livia.hau...@web.de]
> Envoyé : mardi 8 février 2011 22:51
> À : java-user@lucene.apache.org
> Objet : RE: How to implement a proximity search using LINES as slop
>
> Hi Pierre,
>
> many tha
indeed.
I hope some lucene expert can give his insight about all this. :)
Pierre
-Message d'origine-
De : Livia Hauser [mailto:livia.hau...@web.de]
Envoyé : mardi 8 février 2011 22:51
À : java-user@lucene.apache.org
Objet : RE: How to implement a proximity search using LINES as
RE: How to implement a proximity search using LINES as slop
>Hi Livia,
>
>One way of doing this line slope would be to implement a custom tokenizer that
>could tokenize on new line, and split each token into the words it contains.
>I.e. Each word of a line would be seen as being
;m quite new to solr. :)
Pierre
-Message d'origine-
De : Livia Hauser [mailto:livia.hau...@web.de]
Envoyé : lundi 7 février 2011 20:59
À : java-user@lucene.apache.org
Objet : How to implement a proximity search using LINES as slop
Hi All,
I use solr 3.x and put excel documents int
Hi All,
I use solr 3.x and put excel documents into an index.
I have my own query parser and use SpanQueries to provide a proximity search
feature. It works really good.
Most often than not its better to limit the proxmity to one or two line's, not
to X words.
I try to find a NewLine indi
Hi Robert,
it looks really good!
Many thanks!
Regards,
Livia
-Ursprüngliche Nachricht-
Von: "Robert Muir" <rcm...@gmail.com>
Gesendet: 16.01.2011 18:50:36
An: java-user@lucene.apache.org
Betreff: Re: how to implement a proximity search feature using Queries instead
o
On Sun, Jan 16, 2011 at 12:42 PM, Livia Hauser wrote:
> Hi All,
>
> i have my own query parser which generates fuzzy/wildcard queries instances.
> It works fantastic, Lucene rocks ;-).
> But i have to make sure the words are not to far apart. I checked current
> proximity implementation. What i
Hi All,
i have my own query parser which generates fuzzy/wildcard queries instances. It
works fantastic, Lucene rocks ;-).
But i have to make sure the words are not to far apart. I checked current
proximity implementation. What i found is: PhraseQuery calculates a distance
between terms (n
ch"~slop
>
> This includes documents with one of more of the terms, but prefers those
> with an edit distance <= the slop.
>
>
> -Original Message-
> From: Joel Halbert
> Reply-To: java-user@lucene.apache.org
> To: java-user@lucene.apache.org
> Subje
age-
From: Joel Halbert
Reply-To: java-user@lucene.apache.org
To: java-user@lucene.apache.org
Subject: Re: scoring adjacent terms without proximity search
Date: Sat, 31 Oct 2009 08:38:29 +
Thank you all for your suggestions, I shall have a little think about
the best way forward, and report
nt to
include documents that might only have a subset of words from the
phrase. (e.g. just cheese, or just sandwich, but not both).
-Original Message-
From: Robert Muir
Reply-To: java-user@lucene.apache.org
To: java-user@lucene.apache.org
Subject: Re: scoring adjacent terms without proximity s
> I suppose you could precompute the proximity associations by indexing
> n-grams (in this case, called Lucene calls them shingles), such that there
> is a single token in your index containing cheese_sandwich (effectively)
>
>
doh, I see Grant already lead you in this direction. (sorry for the
dup
y problem in general, but maybe it would help,
depending on your requirements.
On Fri, Oct 30, 2009 at 5:49 AM, Joel Halbert wrote:
> Hi,
>
> Without using a proximity search i.e. "cheese sandwich"~5
>
> What's the best way of up-scoring results in which the search te
ur
queries would look like:
"cheese sandwich d0"^4 "cheese sandwich d1"^3
"cheese sandwich d2"^2 "cheese sandwich d3"^1
Steve
> -Original Message-
> From: Joel Halbert [mailto:j...@su3analytics.com]
> Sent: Friday, October 30, 2009 5:
On Oct 30, 2009, at 5:49 AM, Joel Halbert wrote:
Hi,
Without using a proximity search i.e. "cheese sandwich"~5
What's the best way of up-scoring results in which the search terms
are
closer to each other?
I'm not aware of any query technique to score based on prox
Hi,
Without using a proximity search i.e. "cheese sandwich"~5
What's the best way of up-scoring results in which the search terms are
closer to each other?
E.g. so if I search for:
content:cheese content:sandwich
How do you ensure that a document with content:
"Toa
gt; For additional commands, e-mail: java-user-h...@lucene.apache.org
>
>
>
--
View this message in context:
http://www.nabble.com/Range-query-and-a-proximity-search-tp24582865p24586758.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> Can you please suggest me some pointers as to how a range
> query combined with proximity be done.
Your remedy is ComplexPhraseQueryParser that utilizes SpanQuery family.
https://issues.apache.org/jira/browse/LUCENE-1486
That accepts ranges, ORs, Wildcards inside Phrase queries.
Using this new
string String q = "contents: revision AND [40 TO 50]" but, the
problem was that if the revision number is 30 and the document had a number
47 in its content then the document is considered as a match. Changing the
string to : "contents:\”revision AND [40 TO 50]\"~5" for specif
See page 88 in Lucene In Action for a fuller explanation, including
ordering considerations.
But basically, phrase query slop is the maximum number of
"moves" be required to get all the words next to each other
in the proper order. If you can get all the words next to each
other within slop moves,
Hi All,
I had posted the below mentioned query a week back and I have not
received any response from the group so far.
I was wondering if this is a trivial question to the group or it has been
answered previously.
I appreciate your answers or any pointers to the answers are also welcome.
Hi,
I have a question on the proximity query usage in Lucene Query Syntax.
The documentation says "W1 W2"~5 means W1 and W2 can occur within 5 words.
Here W1 & W2 represents Words.
What happens when I give "W1 W2 W3 W4"~25 as proximity query?
Does it treat each word pairs (W1, W2) , (
AUTOMATIC REPLY
LUX is closed until 5th January 2009
-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org
AUTOMATIC REPLY
LUX is closed until 5th January 2009
-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org
me know if you need more help.
regards,
RB
--- On Sun, 12/28/08, Vasudevan Comandur wrote:
> From: Vasudevan Comandur
> Subject: Proximity Search between phrases
> To: java-user@lucene.apache.org
> Date: Sunday, December 28, 2008, 4:19 PM
> Hello,
>
> I am new to
documents.?
For Ex. The query is "Economic Meltdown in Asian Countries" and the two
phrases are "Economic Meltdown" and "Asian Countries". I would like to
use proximity search between the two phrases.
How can I construct the Lucene query for proximity sea
Take a look at SpanQuery and SpanNearQuery.
- Original Message
From: Vasudevan Comandur
To: java-user@lucene.apache.org
Sent: Sunday, December 28, 2008 3:20:47 PM
Subject: Proximity Search between phrases
Hello,
I am new to using Lucene Indexing Server and to query syntax as well
documents.?
For Ex. The query is "Economic Meltdown in Asian Countries" and the two
phrases are "Economic Meltdown" and "Asian Countries". I would like to
use proximity search between the two phrases.
How can I construct the Lucene query for proximity sea
On Wed, May 28, 2008 at 5:36 AM, stefano coppi <[EMAIL PROTECTED]> wrote:
> text: BB AA
> query: "AA BB"~0 why the result is false? Aren't BB AA contigous?
> result: false
>
> text: BB AA
> query: "AA BB"~1
> result: false
>
> text: BB AA
> query: "AA BB"~2 why with proximity=2 the result is tru
Hello everyone,
I'm testing the use of proximity search operator (~) in Lucene.
I noticed a strange behaviour when the terms in the text are not in the same
order of the query.
Here are some examples:
text: AA BB
query: "AA BB"~0
result: true
text: AA ZZ BB
query: "AA
e abc_page1.txt , abc_page2.txt ...
> abc_pageN.txt , is it possible to index them and still retain the
>
> Lucene proximity search because technically it is a single document
>
>
>
>
>
> Thanks
>
> chandan
>
>
>
>
Hi,
I have a document and each page of this document is extracted into single
text files
For ex, document abc.doc have abc_page1.txt , abc_page2.txt ...
abc_pageN.txt , is it possible to index them and still retain the
Lucene proximity search because technically it is a single document
On Thursday 01 November 2007 10:45, Sonu SR wrote:
> I got confused of proximity search. I am getting different results for
> the queries TTL:"test device"~2 and TTL:"device test"~2
Order is significant, this is described here:
http://lucene.zones.apache.org:8080
Hi,
I got confused of proximity search. I am getting different results for the
queries TTL:"test device"~2 and TTL:"device test"~2
I expect same result for the above two queries. Is there any importance of
position of terms in a proximity query? Anybody please help me how lu
Yes, I understood what you said. What I meant is, since i am using Lucene
2.1, I don't get the parse exception. So I thought it's working just like
using quotes.
Thanks,
Sonu
On 9/21/07, Chris Hostetter <[EMAIL PROTECTED]> wrote:
>
>
> : I checked the lucene converted syntax (using Query.toString
: I checked the lucene converted syntax (using Query.toString()) in both case
: and found the second one actually not converting to proximity query.
I don't think you understood what I was trying to say...
using parens with a "~" character after it is not currently, and has never
been (to my kn
Thanks Hoss, for the reply. I am using Lucene 2.1.
I checked the lucene converted syntax (using Query.toString()) in both case
and found the second one actually not converting to proximity query.
"cat dog"~6 is converted to ABST:"cat dog"~4 and
(cat dog)~6 is converted to +ABST:cat +ABST:dog.
Tha
: Is the query "cat dog"~6 same as (cat dog)~6 ?
: I think both case will search for "cat" and "dog" within 6 words each other.
: But I am getting different number of results for the above queries. The
: second one may be the higher. Please clarify this.
i don't believe:(cat dog)~6 is eve
Hi,
I have a doubt on proximity search.
Is the query "cat dog"~6 same as (cat dog)~6 ?
I think both case will search for "cat" and "dog" within 6 words each other.
But I am getting different number of results for the above queries. The
second one may be the higher
Very good note, I missed that. I need the development environment in front
of me to remember all the different class names correctly. ;-)
-- j
On 3/1/06, Doug Cutting <[EMAIL PROTECTED]> wrote:
>
> Jeff Rodenburg wrote:
> > Following on the Range Query approach, how is performance? I found th
Jeff Rodenburg wrote:
Following on the Range Query approach, how is performance? I found the
range approach (albeit with the exact values) to be slower than the
parsed-string approach I posited.
Note that Hoss suggested RangeFilter, not RangeQuery. Or perhaps
ConstantScoreRangeQuery, which i
Thanks to everyone on the replies. I'm going to try several of these
approaches and with equivalent data sets and run some side-by-side tests.
No timeframes guarantees here, but I'll report back with the different
approaches and the test results.
cheers,
-- j
On 2/28/06, Chris Hostetter <[EMAI
: Very good points, I hadn't considered the term frequency of the digits
: affecting scoring. As an aside, can that aspect of the score be ignored for
: these fields?
The easiest way is to use a boost that is so low it's insignificant, or
you could subclass TermQuery and override getSimilarity t
Very good points, I hadn't considered the term frequency of the digits
affecting scoring. As an aside, can that aspect of the score be ignored for
these fields?
I need to spend more time with FunctionQuery, I haven't given it the
attention it deserves.
Great feedback, thanks for the notes.
-- j
Message-----
> From: Jeff Rodenburg [mailto:[EMAIL PROTECTED]
> Sent: Tue 2/28/06 3:10 PM
> To: java-user@lucene.apache.org
> Cc:
> Subject:Hacking proximity search: looking for feedback
>
> I've been wrestling with a way to index and search data with a
> geo
ssage-
> From: John Powers [mailto:[EMAIL PROTECTED]
> Sent: Tue 2/28/06 3:53 PM
> To: java-user@lucene.apache.org
> Cc:
> Subject:RE: Hacking proximity search: looking for feedback
>
> I don't know if this matters, but we do all of our geolocating in sql
&
[mailto:[EMAIL PROTECTED]
Sent: Tue 2/28/06 3:53 PM
To: java-user@lucene.apache.org
Cc:
Subject:RE: Hacking proximity search: looking for feedback
I don't know if this matters, but we do all of our geolocating in sql
with decent speed. All the trig is in the query itsel
ility?
-Original Message-
From: Bryzek.Michael [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 28, 2006 2:49 PM
To: java-user@lucene.apache.org
Subject: RE: Hacking proximity search: looking for feedback
Jeff -
This is an interesting approach. On our end, we have experimented with
two var
rg
Cc:
Subject:Hacking proximity search: looking for feedback
I've been wrestling with a way to index and search data with a
geo-positional aspect. By a geo-positional search, I want to constrain
search results within a given location range. Furthermore, I want to allow
the u
: Geo definition:
: Boxing around a center point. It's not critical to do a radius search with
: a given circle. A boxed approach allows for taller or wider frames of
: reference, which are applicable for our use.
if you are just loking to confine your results to a box then i think
RangeFilteri
I've been wrestling with a way to index and search data with a
geo-positional aspect. By a geo-positional search, I want to constrain
search results within a given location range. Furthermore, I want to allow
the user to set/change the geo-positional boundaries as needed for their
search. This i
urely, so let me change the code, test it
and if there is still a problem I'll get back to the list for help.
Ross
-Original Message-
From: Erik Hatcher [mailto:[EMAIL PROTECTED]
Sent: Monday, June 27, 2005 6:40 PM
To: java-user@lucene.apache.org
Subject: Re: proximity search not wo
don't know what could be wrong at this point.
Erik
On Jun 27, 2005, at 5:06 PM, Angelov, Rossen wrote:
When I'm using the QueryParser directly, the proximity search works
fine and
getPhraseSlop() returns the correct slop int.
The problem is when I extend QueryParser. When exte
When I'm using the QueryParser directly, the proximity search works fine and
getPhraseSlop() returns the correct slop int.
The problem is when I extend QueryParser. When extending it, getPhraseSlop
always returns the default value - 0. It's like setPhraseSlop is never
called.
Does an
Consider a situation in which i have indexed the terms under two different
fields (say FIELD_TEXT and FIELD_SYNONYM).
What if I wanted to support queries like
"jaguar NEAR london", when i have indexed a document with
"panthers in zoos around London". So given that Lucene doesn't support
cross-fie
-- Forwarded message --
Date: Fri, 1 Apr 2005 15:34:10 -0500
From: Erik Hatcher <[EMAIL PROTECTED]>
Reply-To: java-user@lucene.apache.org
To: java-user@lucene.apache.org
Subject: Re: proximity search in lucene
On Apr 1, 2005, at 2:29 PM, Sujatha Das wrote:
Hi,
Does Lucene s
On Apr 1, 2005, at 2:29 PM, Sujatha Das wrote:
Hi,
Does Lucene support "SpanNear" or phrase queries where the clauses or
terms are not of the same field?
If not, could someone let me know which is the way to support
proximity searches with terms belonging to different fields.
No, it does not sup
Hi,
Does Lucene support "SpanNear" or phrase queries where the clauses or terms
are not of the same field?
If not, could someone let me know which is the way to support proximity
searches with terms belonging to different fields.
Thanks much,
Sujatha Das
---
80 matches
Mail list logo