search for: add_term

Displaying 20 results from an estimated 30 matches for "add_term".

2008 Jul 12
1
add_term
i used to use document.add_term("term"); to associate document with a term that did not appear in html, but add_term function might have changed, as i no longer get results for associated terms. what would be the new way to do it ? Thank You
2012 Jun 25
1
[PATCH 1/2] drm/nouveau/pm: Prepare for more GDDR5 MR values
...veau_mem.c index 1e1483e..1d290ab 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mem.c +++ b/drivers/gpu/drm/nouveau/nouveau_mem.c @@ -626,6 +626,7 @@ nouveau_mem_gddr5_mr(struct nouveau_device *ndev, u32 freq, struct nouveau_pm_memtiming *boot, struct nouveau_pm_memtiming *t) { + u8 add_term; /* CMD/ADD termination */ if (len < 15) { t->drive_strength = boot->drive_strength; t->odt = boot->odt; @@ -644,18 +645,24 @@ nouveau_mem_gddr5_mr(struct nouveau_device *ndev, u32 freq, return -ERANGE; } - if (t->odt > 3) { + if (t->odt > 2) { NV_WARN(n...
2004 Sep 15
1
Objects in PHP4
...d with newer versions of SWIG. But that's wrong as the switches have opposite meanings (and what was "-shadow" is now the default). Oops! If I remove -noproxy, I can write object like code and it parses ok, but this simple example causes a segfault: $doc = new Document(); $doc->add_term("a"); This fits with a mail from James a while back reporting that removing "-noproxy" caused segfaults. Some other small examples work. The only thing that strikes me about the above is that a default argument comes into play. And if I add `,1' after `"a"'...
2020 Feb 08
2
prioritizing aggregated DBs
...n from the PostingSource for matching documents). Cool. I'll keep that in mind down the line. That could be a while since some users are still on 1.2 and tend to stick to what's provided by enterprise/LTS distros. > > Or would I fiddle with wdf_inc for all ->index_text and ->add_term > > calls on a per-DB basis? > > That would probably work if you don't want to be able to vary the > prioritisation dynamically. That's a compromise I'll have to make, for now. Thanks for the response!
2020 Feb 07
2
prioritizing aggregated DBs
...Bs which aren't sharded, say: linux-DB, glibc-DB, freebsd-DB. I want to search for something across all of them, but prioritize results to favor one or some of those DBs over others. Is there a way to do that without reindexing? Or would I fiddle with wdf_inc for all ->index_text and ->add_term calls on a per-DB basis? Thanks.
2014 Apr 13
2
Adding an external library to Xapian
It is there: https://github.com/sidmutha/xapian/blob/master/xapian-core/api/Makefile.mk#L53 On an other note, I'm trying to run ./bootstrap from the cloned repo. But it gives an error saying "unknown option -C" followed by "Bootstrap failed". *Siddhant Mutha* Undergraduate Student Department of Computer Science and Engineering IIT Madras Chennai
2013 Sep 02
2
having trouble with prefixes
...t database setup with one record. $ delve -r 1 -V /tmp/1/ Values for record #1: 0:DD4F2162FFFF0E43741A4A1C2B8EC0E7 1:./Text_page_scan_2.jpg 2:jpg 3:.jpg Term List for record #1: E:.jpg P:./Text_page_scan_2.jpg Q:DD4F2162FFFF0E43741A4A1C2B8EC0E7 T:jpg The terms were added with lines like this: doc.add_term(string("P:") + path); Problem is, I can't seem to run a query that returns the document using any of the terms. Here is the outline of the code that runs the queries I'm trying to run: Database db(db_path.string()); QueryParser queryparser; Stem stemmer("english");...
2008 Jan 15
7
PHP indexing, what's the PHP method for indexscript
...omething back (with the underneath code, I just get a bunch of pid's back). $doc = new XapianDocument(); $doc->set_data($postrow['pid']); $doc->add_value(1,date('Ymd',$postrow['postdate'])); $doc->add_value(2,$postrow['author_id']); $doc->add_term("XAUTHORID".$postrow["author_id"]); $doc->add_term("XAUTHORNAME".$postrow["forum_id"]); $indexer->set_document($doc); $indexer->index_text($postrow['post']); //post == sample // Add the document to the database. $database...
2016 Jul 24
3
Xapian 1.4.0 released
...nd continue with indexing. Kevin -- I wonder what others are currently doing when this comes up (or if they're just ignoring it). Another approach, which I've mentioned on the PR, might be to auto-truncate terms earlier in the process, using a convenience function wrapped inside a call to `add_term()` and similar. This would allow people who find use for the exception to continue using things that way. Alternatively, maybe we could find a way of configuring this behaviour. I certainly see the benefit in some situations of being able to just fling data at an indexer and not worry over-much ab...
2007 May 15
1
Document ID 0 is invalid... but not always...
...tuation... Here is a simple PHP test : $db=new XapianWritableDatabase('pathtodb', Xapian::DB_CREATE_OR_OVERWRITE); $doc=new XapianDocument(); $doc->set_data('metadata'); // waiting for http://www.xapian.org/cgi-bin/bugzilla/show_bug.cgi?id=143 $doc->add_term('metadata'); $db->replace_document(-1, $doc); // or 4294967295 = (2^32)-1 $doc=new XapianDocument(); $doc->set_data('data'); $doc->add_term('data'); $docId=$db->add_document($doc); // get_lastdocid()+1 overflows, will return 0 echo &quo...
2006 Jan 31
1
retrieving attributes of searchresults
...) { my $w = $words[$i]; $w =~ s/[\.-]$//g; $doc->add_posting($w,++$i) if $w; } $db->add_document($doc); sub _add_attr { my ($doc,$data) = @_; for my $k (keys %$data) { if (ref $data->{$k}) { # arrayref / multivalue field for my $v (@{$data->{$k}}) { $doc->add_term($k . lc(decode_entities($v))); } } else { next unless defined $data->{$k}; $doc->add_term($k . lc(decode_entities($data->{$k}))); } } } ------------>8------------------------------------------------------- ------------>8----------------------------------...
2012 Nov 21
1
about index speed of xapian
...in, line)) { int pos = line.find('|'); if (pos != std::string::npos) { std::string imsi = line.substr(0, pos); std::string msisdn = line.substr(pos + 1); Xapian::Document doc; doc.add_term(imsi); doc.add_term(msisdn); database.add_document(doc); } } database.close(); std::cout << now.elapsed() << std::endl; } catch (const Xapian::Error& error) { std::cout << error.get...
2008 May 12
1
Using StemFilter with PhraseQuery
...y is as follows: def generate_query(phrase) phrase = phrase.downcase phrase_parts = phrase.split('' '') query = Ferret::Search::PhraseQuery.new(:content, 2) phrase_parts.each do |part| # puts "part: \"" + part + "\"" query.add_term(part, 1) end query end -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ferret-talk/attachments/20080512/a27caba9/attachment.html>
2014 Apr 13
2
Adding an external library to Xapian
I am working in Ubuntu 12.04. I have tried re-configuring the source tree too. Removing the destructor stops the error messages for the destructor but the constructor's error persist. ERROR: http://pastebin.com/r0wYNfEs On Sun, Apr 13, 2014 at 10:56 PM, James Aylett <james-xapian at tartarus.org>wrote: > On 13 Apr 2014, at 17:49, Siddhant Mutha <siddhantmutha at gmail.com>
2014 Apr 13
2
Adding an external library to Xapian
...d to your master (on top of the git revert > above) is: > > diff --git a/xapian-core/api/trie.cc b/xapian-core/api/trie.cc > index eba3a15..b856f39 100644 > --- a/xapian-core/api/trie.cc > +++ b/xapian-core/api/trie.cc > @@ -33,10 +33,10 @@ Trie::Trie() { > void > Trie::add_term(std::string term) { > struct trie_node *curr_node = &root; > - for (int i = 0; i < term.size(); ++i) { > + for (unsigned int i = 0; i < term.size(); ++i) { > for (vector<trie_node *>::iterator it = > curr_node->children.begi >...
2010 Jun 09
1
TermGenerator incorrectly tokenizes German text which contains special characters
...All character encodings are set to UTF-8, the MySql database is also in UTF-8 encoding. * #1 $lIndexer = new XapianTermGenerator(); #2 $lStemmer = new XapianStem(XapianHelper::GetStemmer($pLanguage)); // ?german? #3 $lIndexer->set_stemmer($lStemmer); #4 $lDoc = new XapianDocument(); #5 $lDoc->add_term($lObj->Id); #6 $lIndexer->set_document($lDoc); #7 $lIndexer->index_text("Nahrungserg?nzungsmittel Ausrei?er"); #8 $lIndexer->index_text($lSomeStringFromDb);* In the code example just above here the problem only occurs when I try to index text on line #8. The string which get...
2006 May 15
1
term / posting question
Hi guys Sorry to take up your time with this, I have just been stuck on a little problem with xapian for a few days here and I can't seem to figure it out for myself. I have created an xapian index (using the php bindings). I have added documents to it, with values, terms and postings. I can successfully search in this index on anything that is in a posting, but if I search on a word that
2006 Dec 16
1
Changing weights per field
I'm not entirely sure if the following is possible with xapian (didn't see much in the way of the documentation that says it is). I have four fields which reference a PK in our DB that I'd like to index (in most weighted to least weighed order): full name, e-mail, title and location. I see I how I can use add_document() to add a concatenated string of the 4 fields, but how would I
2010 Feb 02
1
How to use a custom stemmer from Python bindings?
Hi, I'm using Xapian bindings for Python in my project. How could I use a custom stemmer instead of the included one (Snowball)? The one I'm looking at right now is Hunspell (http://hunspell.sourceforge.net/) which has Python bindings (http://code.google.com/p/pyhunspell/). Thanks in advance, Eugene
2010 Jun 07
2
Is there a 64 character term size limit? In Ruby bindings?
I've just found some items in my Xapian database which aren't being indexed, when the terms are quite long. Example term: Frotherham_doncaster_and_south_humber_mental_health_nhs_foundation_trust It represents that the Freedom of Information request was made to a particular public body. It results in pages like this not correctly showing results: