search for: parse_queri

Displaying 20 results from an estimated 72 matches for "parse_queri".

Did you mean: parse_query
2009 Jan 10
2
QueryParser::parse_query() uses OR by default? How to switch to AND?
I use the QueryParser::parse_query() method but I see it uses "OR" by default between words? Is there a way to make it use "AND" instead? I see there are flags I can pass to the parse_query() method but none seems to allow a switch from OR to AND. I would like to do that without having to write my own query parser. Everything else is fine with the QueryParser parsing, for
2009 Jul 08
1
php error parse_query
I'm having trouble getting a search via php working, I get the following error: *Fatal error*: No matching function for overloaded 'QueryParser_parse_query' in */usr/local/share/php5/xapian.php* on line *1409 *The error occurs at this code $query = $qp->parse_query( $query_string , XapianQueryParser::FLAG_PHRASE |
2007 Feb 22
1
Wildcards
Hello, Thanks Olly , by following to your suggestion I could do the indexing in the CSV file while the search results retrieved from the Postgres and it's working fine. [ I am using the Xapian PHP-binding to index and search.] How could I enable the WILDCARDS in it ? I followed with the online manual which says it is disabled by default there given some method to enable but I am not
2006 Dec 06
1
Bug and patch for +terms with wildcards
In current Xapian SVN HEAD, there is a bug in the query parser concerned with the handling of wildcard terms with a "+" prefix. Specifically, a query such as "+foo* bar" will be parsed by the query parser into Xapian::Query("bar") if there are no terms in the database which start "foo". Instead, since the "+" term cannot be matched, I believe
2010 Mar 31
1
Hyphen search with parse_query()
I'm trying to index the word "peter-bengtsson" (which is different from "peter" & "bengtsson" and is different from "peterbengtsson") and find it. To start with I'm trying to use a basic python script to get to grips with it. When I do this:: qp = xapian.QueryParser() stemmer = xapian.Stem("english") qp.set_stemmer(stemmer)
2018 Sep 30
0
xapian parser bug?
David — this isn't the behaviour I see what QueryParser alone, unless you're driving it in a way I don't expect. In python: >>> import xapian >>> qp = xapian.QueryParser() >>> qp.add_prefix('subject', 'S') >>> str(qp.parse_query('subject:"and"', qp.FLAG_DEFAULT|qp.FLAG_BOOLEAN_ANY_CASE)) 'Query(Sand at 1)'
2011 Sep 23
2
understanding stemming and synonyms
I am working with version 1.2.7 and want to use stemming and synonyms. I use the perl-bindings and get some problems. First of all: the perl-bindings dont allow the QueryParser a third argument when calling parse_query! So i cannot set a default prefix (which perhaps is the solution to my problem, but later more) i have a simple testcase: 3 documents, every document only has one word:
2018 Sep 29
2
xapian parser bug?
Today we noticed that keywords can't be searched as prefixed terms. Or that's what it looks like anyway. I tested and, or, and not. ╰─% NOTMUCH_DEBUG_QUERY=y notmuch search 'subject:"and"' Query string is: subject:"and" notmuch search: A Xapian exception occurred A Xapian exception occurred parsing query: Syntax: <expression> AND <expression> Query
2011 Jul 27
3
Searching using prefixes
Hi guys I'm trying to figure out how I can use probabilistic searching on a given field within a document; I've written to the list about this before, but haven't quite figured out what's required and, following a little research, I think I understand what I need to do but I'd like a clarification on this. o We have a database of a number of documents, with fields: title,
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
2010 Oct 28
1
hypens in words + NEAR + 3 terms + AND_MAYBE => crash
Probably an uncaught malformed query - the following form of search queries causes a crash for me (core 1.2.3, Perl API, 64bit Debian Lenny, self-compiled): x-y NEAR test NEAR test The first term can be anything with a hyphen in it but word characters at the beginning and end ("3--3" will do). The other 2 terms can be anything. "test NEAR x-y NEAR test" will not cause a
2018 Sep 30
3
xapian parser bug?
On Sun, Sep 30, 2018 at 09:50:30AM +0100, James Aylett wrote: > Note that I'm using 1.4.7, and from your output I believe you're not > (the * in the query description I believe doesn't happen in those > situations any more). 1.4.4 and later eliminate redundant 0 scaling factors, but this one isn't actually redundant: > > Query(((Tmail AND 0 * XSUBJECTnot at 1)
2008 Sep 16
0
[PATCH] Add set_max_wildcard_expansion method to the queryparser.
--- search-xapian/XS/QueryParser.xs | 6 ++++++ search-xapian/Xapian/QueryParser.pm | 7 +++++++ xapian-core/include/xapian/queryparser.h | 3 +++ xapian-core/queryparser/queryparser.cc | 6 ++++++ xapian-core/queryparser/queryparser.lemony | 9 +++++++++ xapian-core/queryparser/queryparser_internal.h | 4 +++- 6 files changed, 34
2009 Nov 15
1
setting ValueRangeProcessor at runtime
I want to set a variable number and type of ValueRangeProcessors at run time based on a configuration file. But I seem to be running into (what I think is) a C++ scope issue. I tried just a simple test to see if I could add 5 VPs in a loop. Xapian::QueryParser qparser; Xapian::Query query; int vp = 0; while(vp < 5) { Xapian::StringValueRangeProcessor sproc(vp++);
2018 Aug 09
2
Boosted fields search in Python
Hi, I'm using Xapian in Python2. I'm trying to replicate an analysis that somebody else performed in Lucene. To do that I need to do a search for a multi-word query in which particular fields are boosted - preferably at query time. That is, given a query like "the cat is lying on the mat" (with an OR operator, ignoring word positions but with stemming and stop words removed),
2010 Feb 01
0
Solaris core dump
Hi everyone, I'm having a problem with xapian (the matchspy branch, with Python bindings) on Solaris 10 / SPARC. Users can run queries for a few hours with no problems, then it returns "inflate failed (invalid code lengths set)" to Python and dumps core. gdb reports: #0 0xfe6dc910 in inflate_table () from /usr/lib/libz.so.1 #1 0xfe6d9d6c in inflate () from /usr/lib/libz.so.1 #2
2010 Nov 02
1
How to make QueryParser select entire word like "H.O.T"
Hi, I'm using xapian to build my search engine, but met with a problem. The code snippet is like: ----------------------Code begin------------------------------------------------------------- Xapian::QueryParser qp; qp.add_prefix("Singer", "S"); Xapian::Query query = qp.parse_query("Singer:s.h.e",
2011 Jul 14
1
'phrase' default-op mixed with hyphenated words
Hi all, I've come across an issue caused when I try to set the query parser's default op to OP_PHRASE: Xapian raises an Unimplemented Error if the query contains hyphenated words or other terms that implicitly generate a phrase. This can be shown with the following Python extract: >>> from xapian import * >>> qp = QueryParser() >>>
2012 Oct 04
1
Auto completion using xapian
Hello, Do xapian has analyzer like EdgeNGram to use it for autocomplete. I am trying to use the auto completion using xapian. For example: e ex exa exam example etc.. so that we can get it. I tried to use using the Partial flag but it dose not work Xapian::Query query = parser.parse_query("m*",parser.FLAG_PARTIAL); Do you have any example or any tutorial is appreciated. --Naveen.
2013 Feb 21
1
Parsing fields with phrases.
I have the following code: my $par = $qp->parse_query($query,Search::Xapian::FLAG_SPELLING_CORRECTION); print LOG "Query $query, par $par\n"; my $enq = $xDatabase->enquire( $par ); The output from the LOG file is: Query title:"new dolphin", par Xapian::Query(0 * Snew dolphin) No results are returned. If I change the search to title:dolphin it finds a