search for: enq

Displaying 20 results from an estimated 58 matches for "enq".

Did you mean: end
2017 Apr 09
3
Omega: Missing support for newer weighting schemes
...ethod in omega/weight.cc > would then use parse_params method to create the specific object with params > in the "scheme" string. E.g. - > > if (startswith(scheme, "bm25")) { > const char *p = scheme.c_str() + 4; > if (*p == '\0') { > enq.set_weighting_scheme(Xapian::BM25Weight()); > return; > } > if (C_isspace(*p)) { > Xapian::BM25Weight wt = Xapian::BM25Weight::parse_params(p); > enq.set_weighting_scheme(wt); > return; > } > } No, use Xapian::Registry to find t...
2007 Sep 30
1
Perl example of using termitrator?
I'm having trouble translating from C++ to perl objects. The TermIterator class looks like to get a set of terms in a document you might have C++ code like: Enquire::TermIterator termIt =enquire->get_matching_terms_begin(id); for(;termIt != enquire->get_matching_terms_end(id);termIt++) { string term = *termIt; } Or something similar. However when I attempt to translate that into perl, I am trying:( I am working in the blind here) foreach...
2017 Apr 12
4
Omega: Missing support for newer weighting schemes
.... Hi Olly -- the following piece of tested code in omega/weight.cc hopefully achieves what we intend to do. It works fine for all tests. Please let me know what you think. if (startswith(scheme, "pl2")) { const char *p = scheme.c_str() + 3; if (*p == '\0') { enq.set_weighting_scheme(Xapian::BM25Weight()); return; } if (C_isspace(*p)) { Xapian::Registry reg; const Xapian::Weight * wt = reg.get_weighting_scheme("Xapian::PL2Weight"); enq.set_weighting_scheme(*wt->set_parameter_values(p)); return;...
2007 Feb 02
1
Working demo of search engine using boolean query.
...; my $secondary_terms = "fitness Diseases diet science "; $secondary_terms =~ tr/A-Z/a-z/; # convert to lower case #------------------------------------------------------------------------------# my $db = Search::Xapian::Database->new( '/home/myhealthcare/xapian_index' ); my $enq = $db->enquire(); #------------------------------------------------------------------------------# my @primary_terms = split ' ', $primary_terms; my @secondary_terms = split ' ', $secondary_terms; #------------------------------------------------------------------------------#...
2006 Mar 29
1
Using boolean terms in PHP bindings
...//set the database queryparser_set_database ($query_parser, $db); //set prefix queryparser_add_boolean_prefix($query_parser, "XC", "1"); //parse and create the query $query = queryparser_parse_query ($query_parser, $_REQUEST["search"]); $enq = new_enquire ($db); enquire_set_query ($enq, $query); $result_set = enquire_get_mset ($enq, 0, 10); $item = mset_begin ($result_set);
2023 Aug 18
1
does Xapian::Enquire hold an MVCC revision?
On Thu, Aug 17, 2023 at 09:28:26PM +0000, Eric Wong wrote: > In other words, is it possible to avoid duplicates if new > documents are inserted into the DB by another process in-between > ->get_mset calls when reusing Xapian::Enquire objects? The Database object itself effectively does (it works in a snapshot of the state of the database when you open it, or last called reopen() which updates that snapshot to what's currently committed). However we don't currently have any locking of the snapshots that readers are...
2008 Jan 04
2
Agents and AddQueueMember
Hi, I have callcenter running with v 1.2 with AgentCallbackLogin and now trying to move to 1.4 using the example doc, doc/queues-with-callback-members.txt. From what I understand the basic idea in the example is to 1. Authenticate a caller with VMAuthenticate 2. Get his SIP Channel number 3. Use
2017 Apr 13
2
Omega: Missing support for newer weighting schemes
...a Xapian::UnimplementedError > error. I wonder if you meant the same method? That's the default implementation - each subclass overrides that with an actual implementation (at least if it wants to work with remote databases). > > The code in omega would just be: > > > > enq.set_weighting_scheme(Xapian::Weight::parse_params(scheme)); > > I wonder if we could do something more like: > > enq.set_weighting_scheme(Xapian::Registry::get_weighting_scheme(name).parse_params(params)); > > where, Xapian::Registry::get_weighting_scheme(name) returns a weight...
2013 Aug 21
2
Perl interface isn't working in 1.2.x
...$qp = Search::Xapian::QueryParser->new(); my $dbSize=$db->get_doccount(); # $qp->set_stemmer(new Search::Xapian::Stem("english")); # $qp->set_stemming_strategy(STEM_SOME); # $qp->set_default_op($defaultop); my $par = $qp->parse_query($query); my $enq = $db->enquire( $par ); my @matches = $enq->matches($nstart,$nrecords); my $mset = $enq->get_mset($nstart,$nrecords); my $est = $mset->get_matches_estimated(); my $totTime=0; foreach my $match ( @matches ) { my $doc = $match->get_document();...
2013 Aug 26
2
Perl interface isn't working in 1.2.x
On 08/25/2013 05:02 PM, Olly Betts wrote: > So the simple fix is > probably just to install the perl-Search-Xapian RPM instead. Thanks, the Centos 6 repos don't have that rpm and the http://xapian.org/download page seems to only cover the XS bindings, if I am reading this correctly: But I was able to remove the rpm packages and compile and install the core and swig from source.
2023 Aug 17
1
does Xapian::Enquire hold an MVCC revision?
In other words, is it possible to avoid duplicates if new documents are inserted into the DB by another process in-between ->get_mset calls when reusing Xapian::Enquire objects? I do some expensive processing on each mset window, so I always limit the results to limit heap usage even if I'm planning on going through a big chunk of the DB: $mset = $enq->get_mset(0, 1000); do_something_slow_with_mset($mset); $mset = $enq->get_mset(1000, 1000); do...
2017 Apr 08
2
Omega: Missing support for newer weighting schemes
On Sat, Apr 08, 2017 at 09:11:22PM +0100, James Aylett wrote: > On 8 Apr 2017, at 19:15, Vivek Pal <vivekpal.dtu at gmail.com> wrote: > > >> and the details of which weighting schemes were available in which version > >> isn't a key part of the $set command itself. > > > > Do you suggest dropping that piece of information out? Since the reason behind
2000 Apr 12
1
swat and the print command field
I've been using SWAT to configure SAMBA for file and print serving at the organization I work at, and I ran into a hitch. The print command we use in smb.conf is "enq -r -c -o"-dc" -P%p %s". After SWAT updates (and when it starts up), the print command in the SWAT display is shortened to "enq -r -c -o". The proper print command is saved into smb.conf, but it needs to be checked every time we make changes to smb.conf via SWAT, as SWAT sho...
2010 Jul 26
2
related documents
Hi All, I would like to take a doc in the xapian DB and find all related documents by relevance e.g. so when you view one document it says "Related entries X Y Z". I'm aware of the "Morelikethis" Lucene plugin that is supposed to do something like this, by generating a query from a document based on term frequency. Has anyone developed a tool to generate a query from a
2007 Feb 09
1
PHP Binding and dbi2omega questions
...: truncate=50 field=content ============================= However, when querying the xapian database using the php xapian bindings like so: <?php include "xapian.php"; // Open our xapian database $db = Xapian::auto_open('/usr/local/lib/omega/data/default'); $enq = new XapianEnquire($db); // Query for "php" or "mysql" $enq->set_query(new XapianQuery(XapianQuery::OP_OR, "php", "mysql")); // lets grab the matches! $mset = $enq->get_mset(0, 10); // output how many estimated echo 'Matches...
2023 Aug 28
1
DatabaseModifiedError while iterating on mset
...n the iterator is created (it is conceivable this might > be different for a new database backend in the future I suppose). Oh wow. In Perl, I only had a retry_reopen wrapper only around the get_mset call to reopen the DB because documents get added frequently: my $mset = retry_reopen(sub { $enq->get_mset(0, 1000) }); for my $m ($mset->items) { ... } But the above was actually unsafe from modifications and I should be doing the following?: my $mset = retry_reopen(sub { $enq->get_mset(0, 1000) }); my $cur = retry_reopen(sub { $mset->begin }); my $end = retry_reopen(sub...
2007 Apr 03
3
More weirdness with PHP bindings
...'t reproduce the bug above. In fact, I don't use a "join(get_matching_terms())" as smoketest do, but iterate with get_matching_terms_begin and get_matching_terms_end. Just by curiosity, I added the following lines in smoketest.php : $hit=$mset->get_hit(0); $it=$enq->get_matching_terms_begin($hit); while (! $it->equals($enq->get_matching_terms_end($hit))) { echo $it->get_term(), ' '; $it->next(); } and with that code, we get the correct terms. So the bug only concerns the way get_matching_...
2019 Sep 25
4
NFS Locking and Submission Service Authentication
...mail storage from the VM for backup reasons. I read as much as I could find on line regarding configuring Dovecot to use NFS, and set it up as best I could, but I'm still running into lock errors e.g.: Sep 25 10:30:35 triata4 dovecot: imap(user at triata.globalchange.media)<75580><enQ/AWSTkQkKCgDu>: Error: fcntl(/vmail/triata.globalchange.media/user/dovecot.index.log, write-lock, F_SETLKW) locking failed: No locks available Sep 25 10:30:35 triata4 dovecot: imap(user at triata.globalchange.media)<75580><enQ/AWSTkQkKCgDu>: Error: mail_index_wait_lock_fd() failed wit...
2007 Mar 29
1
"Bad serialised query" error
...offer some guidance. I haven't managed to get a C++ reproduction in the test suite, but I have got a demo that fails using Python: import xapian db = xapian.remote_open('localhost', 8100) qp = xapian.QueryParser() qp.set_database(db) query = qp.parse_query('test') enq = xapian.Enquire(db) enq.set_query(query) enq.get_mset(0, 10) This script fails with: xapian.InvalidArgumentError: REMOTE:Bad serialised query I've tracked it down to api/omqueryinternal.cc, in QUnserial::readquery(), and is the 2nd occurance of that error message in that function (ie,...
2018 Jun 21
0
Welcome to the "Xapian-discuss" mailing list
...pian.Document() tg = xapian.TermGenerator() tg.set_document(doc) tg.index_text("I am walking, always walking.") db.add_document(doc) Then you can run NEAR queries: import xapian db = xapian.Database("testdb") qp = xapian.QueryParser() qp.set_database(db) def query(query): enq = xapian.Enquire(db) q = qp.parse_query(query) enq.set_query(q) for match in enq.get_mset(0, 10): print(match.docid) query("I NEAR/1 walking") # prints nothing query("I NEAR/2 walking") # prints 1 There's no document in the database where "I"...