similar to: test case for (perl) $qp->get_corrected_query_string()

Displaying 20 results from an estimated 500 matches similar to: "test case for (perl) $qp->get_corrected_query_string()"

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 |
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)'
2006 Mar 07
2
FLAG_BOOLEAN_ANY_CASE does not work
I have found that lower cased boolean operators such as "and" or "or" does not work. Of course I never forget setting FLAG_BOOLEAN_ANY_CASE flag. QP seems to treat them as terms. Just look at the following tests regardless of search results! $ python search.py -v woman AND man Performing query 'Xapian::Query((woman:(pos=1) AND man:(pos=2)))' 0 results
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
2009 Mar 02
0
Xapian, PHP bindings and
Hello, With PHP, I try to get spelling corrections but after 2 days of trying I can make it work !!! Here is my < simple > code : <?php require_once( '../global.info.php' ); require_once( 'xapian.class.php' ); require_once( 'xapianencode.func.php' ); // Open the database for searching. try { $database = new XapianDatabase(
2009 Dec 22
1
Patch submission
Greets, Please find attached a patch (against current svn) for consideration. It covers a few missing elements on the Perl side of things: add_spelling() and test/s. remove_spelling() and test/s. get_corrected_query_string() and test/s. get_spelling_suggestion() and test/s. man pages for the above and for WritableDatabase::close() are also patched. Please let me know of any errors (especially
2010 Jul 28
1
Spelling correction confusion
If I spell "commission" wrongly with an s instead of a t, Xapian (via the QueryParser's get_corrected_query_string function) is finding the right spelling: http://www.whatdotheyknow.com/search/commistion However, if I miss the s out completely, it doesn't find it: http://www.whatdotheyknow.com/search/commision Any idea why that is? Missing the last i out also doesn't
2007 Nov 08
1
QueryParser : some remarks
Hi to all, First, I would like to say a big thank you for the work which was done on my 'wish bug' to allow mapping one field to multiple prefixes (http://www.xapian.org/cgi-bin/bugzilla/show_bug.cgi?id=93). That's great! I have upgraded to 1.0.4 and I am revisiting my code, replacing the php query parser I wrote with Xapian's one. Everything works well, but I have some
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
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
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 May 17
3
QueryParser lowercase / uppercase and stemming
Hello. There are several problems I couldn't find a solution. 1. QueryParser does not perform stemming I am working with PHP5 and use the xapian wrapper written by Daniel M?nard I build a query using parseQuery. Output of the parsed query shows that terms are not stemmed, although a stemmer is set ( see code snippet) # create a XapianDatabase object to search in $db = new
2009 Dec 23
1
flush() definitely required before close()
Greets, WRT this discussion: http://lists.xapian.org/pipermail/xapian-discuss/2009-November/007300.html Richard recommends calling flush() before closing a index database segment, etc. Well, I can confirm that calling flush() is *required* before calling close() since close() on it's own does not commit/flush any pending writes/whatever unless the Perl script terminates, etc. So, for a
2010 Jan 13
1
Revision 13824 compilation failure
g' day Configured with --disable-maintainer-mode. Compilation of revision 13824 is failing with: common/serialise-double.cc: In function ?double unserialise_double(const char**, const char*)?: common/serialise-double.cc:141: error: ?SerialisationError? is not a member of ?Xapian? common/serialise-double.cc:157: error: ?SerialisationError? is not a member of ?Xapian?
2010 Jan 14
1
Latest revision and backwards compatibility
Greetings, I've been wondering about the index format and backwards compatibility. We're using the dev version (for chert) and each svn up means that any indexes created prior to this revision cannot be read. Is this purely a cautious move to prevent errors, and, barring any obvious index format changes, can I safely force the current revision to read existing indexes? eg, by
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
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
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
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,
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: