search for: op_near

Displaying 20 results from an estimated 20 matches for "op_near".

2011 May 27
1
Does OP_NEAR works with stemming?
Hi All, I used the OP_NEAR operator for queryparser, and when I searched for "apple store" from my own collection, the query is parsed as "Zappl:(pos=1) NEAR 11 Zstore:(pos=2)" but retrieved nothing. However, if I type in "Apple Store", the query is parsed as Xapian::Query((apple:(pos=1) NEAR 11...
2011 Dec 14
1
How to enable stemming with default_op set to OP_NEAR
Hi All, I know that from version 1.2.6, if default_op is OP_NEAR or OP_PHRASE then stemming of the terms is disabled, since positional information isn't indexed for stemmed terms by default. However, I would like to try using OP_NEAR as default_op with stemming because I think the near operator is somehow different from exact phrase. Then I wanna see how the...
2011 Dec 07
2
How to choose the proximity between search words
Hi, I'd like to know how we can choose the distance between two words that we search in a text. I know there is an "op_near" operator but I don't know how I can specified that the number of words between the two specified words should not exceed 10 or 20 or x words. I'm really sorry for my terrible English, I hope I'm understandable!
2006 Nov 15
1
Composition of NEAR and OR
...quot; Xapian::Query or1(Xapian::Query::OP_OR, Xapian::Query("one"), Xapian::Query("two")); Xapian::Query or2(Xapian::Query::OP_OR, Xapian::Query("three"), Xapian::Query("four")); Xapian::Query near(Xapian::Query::OP_NEAR, or1, or2); I can't decide by looking at the code in omqueryinternal.cc if this is intentional or not. In debug mode, it does trigger the NEAR or PHRASE assertion at the top of flatten_subqs(), which gets called at some point for the query: ((one NEAR 2 three) OR (one NEAR 2 four)) which...
2016 Dec 29
2
NEAR non-leaf subqueries
Hi, Xapian 1.2 supports a query like: (A OR B) NEAR (C OR D) and distributes the factors to create something like: (A NEAR 2 C) OR (B NEAR 2 C) OR (B NEAR 2 C) OR (A NEAR 2 C) Xapian 1.4 rejects such a query with the error message. OP_NEAR and OP_PHRASE only currently support leaf subqueries Because Recoll expands the terms to their stem siblings at query time, its NEAR queries are affected by the change (no stemming is used with PHRASE queries, so these are unaffected). Of course, it would be possible to effect the distribution at...
2005 Feb 24
2
mutable Query objects
There's a bit of an API glitch with Query objects at present. This code shows it off: Xapian::Database("/path/to/db"); Xapian::Enquire enquire(db); // make a simple query Xapian::Query myquery(Xapian::Query::OP_NEAR, phrase, phrase + 2); enquire.set_query(myquery); // Now change the query - this shouldn't affect the query enquire // will run, but it does. myquery.set_window(10); The essential issue here is that queries are mutable, so Enquire::set_query() needs to clone the Query object to stop it be...
2006 Dec 06
1
Bug and patch for +terms with wildcards
...om> * include/xapian/query.h,api/omqueryinternal.cc: Fix query Index: api/omqueryinternal.cc =================================================================== --- api/omqueryinternal.cc (revision 7553) +++ api/omqueryinternal.cc (working copy) @@ -54,6 +54,7 @@ case Xapian::Query::OP_NEAR: case Xapian::Query::OP_PHRASE: case Xapian::Query::OP_ELITE_SET: + case Xapian::Query::OP_MATCH_NOTHING: return 0; case Xapian::Query::OP_FILTER: case Xapian::Query::OP_AND_MAYBE: @@ -70,6 +71,7 @@ { switch (op) { case Xapian::Query::Internal::OP_LEAF: + case Xa...
2006 Feb 07
1
Omega
Are there any options to forming queries with Omega? For instance can you specify a proximity search like "file near 5 manager"? If so, where might I find this documented? I don't see it in the docs directory. Thanks Jim.
2007 Oct 01
3
How to beat Google aka Xapian & Natural Language Processing.
...and there has been lot of work done that yield inconsistent results. What I am trying to point out is that we need start to think about using natural language processing when placing infrastructure for Xapian. So far we have the following OP_AND, OP_AND_MAYBE, OP_AND_NOT, OP_ELITE_SET, OP_FILTER, OP_NEAR, OP_OR, OP_PHRASE, OP_VALUE_RANGE, OP_XOR search operators and we could add one more OP_NLP. What we can do now is to implement OP_NLP to tagged nouns, adjectives, adverbs, punctuations, foreign words etc. Calculate relation between them and assign boost value to the most occurred terms in query...
2009 Apr 20
1
Xapian 1.0.12 released
...This release fixes a number of bugs and improves efficiency in one case. Notable changes in this release: * WritableDatabase::remove_spelling() now works properly. * The QueryParser now handles scripts which use NON_SPACING_MARK Unicode characters (such as Arabic) better. * Distribution of OP_NEAR and OP_PHRASE over a non-leaf subquery is improved. * The database locking code no longer leaves a zombie child process when the database is already locked. For a more detailed overview see: http://trac.xapian.org/wiki/ReleaseOverview/1.0.12 The full lists of user-visible changes are linked t...
2017 Jan 04
0
NEAR non-leaf subqueries
...> Xapian 1.2 supports a query like: > > (A OR B) NEAR (C OR D) > > and distributes the factors to create something like: > > (A NEAR 2 C) OR (B NEAR 2 C) OR (B NEAR 2 C) OR (A NEAR 2 C) > > Xapian 1.4 rejects such a query with the error message. > > OP_NEAR and OP_PHRASE only currently support leaf subqueries > > Because Recoll expands the terms to their stem siblings at query time, its > NEAR queries are affected by the change (no stemming is used with PHRASE > queries, so these are unaffected). > > Of course, it would be possible...
2017 Jan 20
0
NEAR non-leaf subqueries
...ut OP_OR - note "OP_OR, *etc*" in the description, the title says "non-leaf subqueries", and other operators are explicitly discussed: * OP_AND: https://trac.xapian.org/ticket/508#comment:8 * OP_AND_NOT: https://trac.xapian.org/ticket/508#comment:11 I've added a note about OP_NEAR/OP_PHRASE. > > The code I pushed before wouldn't handle an OR of more than two things, > > so you couldn't do a 3+-way stem expansion: > > > > (text OR texts) NEAR (search OR searches OR searched OR searching) > > > > But I've just pushed...
2018 Sep 30
1
xapian parser bug?
On Sun, Sep 30, 2018 at 09:05:25AM -0300, David Bremner wrote: > if (str.find (' ') != std::string::npos) > query_str = '"' + str + '"'; > else > query_str = str; > > return parser.parse_query (query_str, NOTMUCH_QUERY_PARSER_FLAGS, term_prefix); I wouldn't recommend trying to generate strings to feed to
2018 Jun 21
0
Welcome to the "Xapian-discuss" mailing list
Please keep replies on the mailing list — more people can help (and benefit) that way :) So OP_NEAR looks for its terms close to each other (hence "near"). The window is how far away they can be. Probably the easiest way to play with this is using the NEAR syntax in the query parser. So if you had a plain text document: I am walking, always walking. And index it in a very simple fashi...
2010 Jun 19
2
Xapian 1.0.21 released
...some cases. Fixes ticket#476. * OP_XOR with non-leaf subqueries could skip matching documents in some cases, and OP_XOR of three or more sub-queries could return incorrect weights. Fixes ticket#475. * OP_OR is now more efficient if a subquery is potentially expensive (e.g. OP_VALUE_RANGE, OP_NEAR, OP_PHRASE, PostingSource). A 10-fold speed-up with OP_VALUE_RANGE has been observed. Build System: * Install files to make Xapian easier to use with cmake. Portability * On x86 processors, Xapian now defaults to using SSE2 FP instructions. This avoids issues with excess precision and it...
2015 Jul 26
1
Get term from document by position
...ext_to_index.text_str); db_w.add_document(doc); db_w.commit(); db_w.close(); //searching Xapian::Database db(database_dir); Xapian::Enquire enquire(db); Xapian::QueryParser qp; qp.set_stemmer(stemmer); qp.set_database(db); qp.set_default_op(Xapian::Query::OP_NEAR); qp.set_stemming_strategy(Xapian::QueryParser::STEM_ALL_Z); std::cout << "\n###################################################\n"; std::cout << "query string: " << query_string << "\n"; std::cout << "\n##############...
2011 Sep 04
5
Ranking and term proximity
Hi, I was reading an article recently about how google ranks results (among many other things of course) based on the proximity of the search terms in the source documents. In addition, the position of the search terms in the search query string itself is also taken into consideration when determining how important each term is. Does Xapian do something similar - at least for the first part?
2018 Jun 20
2
Welcome to the "Xapian-discuss" mailing list
Hi, I'm new to Xapian and wanted to know if it has a specific feature. I want to be able to check the relation between two terms on a page based on how close they are together on the page. I want to use a combination of n-gram based labeling and the "slop" feature found in Elasticsearch. Does Xapian have this/a similar feature? I haven't been able to find any programs that have
2017 Jan 20
2
NEAR non-leaf subqueries
Olly Betts writes: > On Thu, Jan 12, 2017 at 07:53:21PM +0100, Jean-Francois Dockes wrote: > > > Recoll also supports multi-word synonyms which could potentially > > generate PHRASE subqueries inside NEAR queries, but this > > understandably already did not work with 1.2, so the multi-word > > expansions are only used when proximity is not involved (by the way,
2017 Jan 04
2
NEAR non-leaf subqueries
...t; (A OR B) NEAR (C OR D) > > > > and distributes the factors to create something like: > > > > (A NEAR 2 C) OR (B NEAR 2 C) OR (B NEAR 2 C) OR (A NEAR 2 C) > > > > Xapian 1.4 rejects such a query with the error message. > > > > OP_NEAR and OP_PHRASE only currently support leaf subqueries > > > > Because Recoll expands the terms to their stem siblings at query time, its > > NEAR queries are affected by the change (no stemming is used with PHRASE > > queries, so these are unaffected). > > >...