Displaying 20 results from an estimated 23 matches for "add_value".
2011 Sep 21
2
Xapian-discuss Digest, Vol 88, Issue 9
Thanks that helped :).
I am still trying to cover add_value some more though since I seem to not
understand it totally.
I guess it is because I am used to Lucene and Sphinx and Solr and it appears
that Xapian seems to attach the type of value stored more on add_value. Like
for example I am still a bit confused on how slotno actually works and what
it actua...
2011 Sep 20
1
Understanding API Documentation for PHP
...ryone,
I am brand new to Xapian so forgive me if I am just being noob.
I looked over the sparse documentation for the Xapian library and its PHP
hooks and I am really confused how to complete my index.
I understand how to add documents etc etc etc and how to build queries but
how I do specify in add_value what field type xapian should take (i.e.
tokenized, unindexed, indexed)?
Is there a list of slotno's anywhere that I can reference to?
In a general sense is there any more programmer orientated
documentation/tutorials rather than researcher orientated document than
http://xapian.org/docs/ tha...
2015 Jan 20
2
Question on "single writer, multiple reader"
On Sun, Jan 18, 2015 at 04:25:29PM +0000, James Aylett wrote:
> That?s exactly how it?s supposed to work. ?Eventually? (once the
> writer gets sufficiently far ahead of the reader), the reader will get
> a DatabaseModifiedError and will have to re-open the database, but
> until then it?s up to it when it does so. You may wish to do it every
> N requests, or every K seconds, or only
2012 Jan 20
2
Perl version of sortable_serialize missing?
I attempted to use the sortable_serialize function from perl, however
doesn't seem to exist. The only occurrence of the string "sortable" in
the /usr/local/perl/5.10.1/Search/ tree is in the pod in Xapian.pm.
What am I doing wrong?
use Search::Xapian;
...
$doc->add_value(4,sortable_serialize($recdate));
Undefined subroutine &main::sortable_serialize called at
newgenstaticindex line 444
Thanks,
Jim.
2008 Jan 15
7
PHP indexing, what's the PHP method for indexscript
...indexing using PHP?
With this, I can get an searchable index, but I have no idea how to set the fields, so that I can actually GET something 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);
$in...
2008 Sep 09
3
sort by value fails
hi all,
i want use sort_by_value to sort by "username".
so in the indexing process i add the value i want sort by as value
(lang is php)
$document->add_value(0, 'value');
when i sort i got all specialchars at the beginning
?
?
?
alf
the values be indexed as utf8.
what do i wrong? any suggestions?
regards,
sven
_______________________________________________________________________
Jetzt neu! Sch?tzen Sie Ihren PC mit McAfee und WEB.DE. 30 T...
2011 Aug 09
3
what is the fastest way to fetch results which are sorted by timestamp ?
what is the fastest way to fetch results which are sorted by timestamp ?
i want to use xapian as my search engine , use add_boolean_term(something) and add_value(0,sortable_serialise(get_timestamp())) to a doc.
search through enquire.set_weighting_scheme(xapian.BoolWeight()) and enquire.set_sort_by_value(0,True) to ensure that the results are sorted by the timestamp.
This method is ok , but is there a faster way to do that ? Since i have millions of re...
2008 Sep 16
1
Some Questions From the beginner of Xapian
Dear, guys:
I am a beginner of Xapian, when reading the documents, I encountered follow questions.
(1) I see the Xapian::Document has a method
void add_value (Xapian::valueno valueno, const std::string &value)
What's the purpose of this method? Document will related to the terms, but what's the purpose of this?
(2) add_posting method will add term to a documents.
void add_posting (const std::string &tname, Xapian::termpos tpos,...
2007 Nov 19
1
find document by doc path
...a document. The document is identified by the document
path e.g. /home/user/file.txt. To find the doc id by the path I need to
assign the path to the document. In the FAQ is supposed to add the doc id
(the path) as a term to the document.
My idea is to at the path as a value by
#define PATH_ID 0
add_value(PATH_ID, "/home/user/file.txt")
and then do a query:
Query (Query::op op_, PATH_ID, "/home/user/file.txt",
"/home/user/file.txt")
Is there a drawback to do such a query on a value? Or is a query on a
value even faster?
thank you
Clemens
--
Using Opera's revo...
2010 Jan 01
1
Document values vs data
In a recent post, someone asked about storing "metadata" in a
document. My guess would have been to use add_value. Olly's
recommendation was to use set_data.
What are the general guidelines for deciding whether to use values or
data in a document?
Garrett
2010 May 22
1
How to search documents with certain values
Hi all,
I am creating Xapian documents and adding a unix timestamp to each document
as a value using the doc.add_value method.
When I search my Xapian database, I want the option to only search documents
with a timestamp within the last year.
Is there a way to search across documents with a value greater than a
specified value string? Or is there a better way of doing something like
this?
Any help would be appre...
2011 Jan 11
1
chert-update creates a db with some errors
...cid() 490
document id 745 in value chunk is larger than get_last_docid() 490
document id 746 in value chunk is larger than get_last_docid() 490
postlist table errors found: 255
I've re-created the 1.1.3 database WITHOUT the values that I add to
documents during the indexing (with the document.add_value)
and in this case the conversion creates a database without errors.
Can someone help me?
--
---------------------
Luca Barbieri
2013 Feb 20
1
Sticky results
Hi there,
I have a xapian index whose results are being sorted by a value, with (PHP bindings):
$enquire->set_sort_by_value($sort_data_value);
This is because I want the results returned in chronological order of publication date. However, I now have a need to have certain results be 'sticky' at the top of the resultset, regardless of their publication date. Obviously there are
2006 Sep 18
16
Dynamic fields and AAF
Hi,
I have a model which has properties, these are your standard name/value
pairs, but also have attributes that affect how I want to store them in
ferret. I was using 0.9.5 with 0.2 of aaf, which seemed fine, I just
copied and pasted (yes, I know, ick) the to_doc method and added code to
iterate though the properties that that model had, and add relavent
fields to the document.
It seems
2018 Mar 30
2
sorting large msets
...B_CREATE_OR_OPEN;
my $xdb = Search::Xapian::WritableDatabase->new($tmp, $flag);
my $n = shift || 100;
for my $i (0..$n) {
$xdb->begin_transaction;
for my $j (0..2000) {
my $doc = Search::Xapian::Document->new;
my $num = Search::Xapian::sortable_serialise(($i * 1000) + $j);
$doc->add_value(0, $num);
$doc->set_data("$i $j");
$doc->add_boolean_term('T' . 'mail');
$xdb->add_document($doc);
$doc = Search::Xapian::Document->new;
$doc->add_value(0, $num);
$doc->set_data("$i $j");
$doc->add_boolean_term('T' . ...
2007 Nov 14
7
BackgrounDRb version 1.0RC1 available now
...uot;send_response" to send
the result back to client ( rails in our case ).
It should be noted that, you must pass original data as an parameter
with send_response
method because original data contains client address.
Following code snippet, would ask bdrb to execute method
''add_values'' in ''foo_worker'' with
arguments ''10+10'' and return the result.
MiddleMan.send_request(:worker => :foo_worker, :method =>
:add_values,:data => "10+10")
You can also use register_status as described in following snippet
to...
2009 Jun 18
1
delete and update
Hi All,
I need to update or delete some documents from a Xapian database. and
I haven't been able to find anything in the API , Is there a way to do it
? What would be the easiest way to do it ?
Thanks.
2012 Jun 04
1
Search not finding queries with stop words.
...$indexer->set_stemmer($stemmer);
$indexer->set_stopper($stopper);
$indexer->set_document($doc);
$indexer->index_text($docBody);
$indexer->increase_termpos();
$indexer->index_text($subject);
... (other index_text and add_value calls)
$xdb->add_document($doc);
If I look for something like index of elements, I get no results even
though that phrase exists (no, I don't do a phrase search, just those
three words separated by spaces). However if I leave off the "of" I get
the expected number...
2012 Nov 03
1
get the title from the document
...///////////// code? for building the index file
??????? # Load content
??????? content = open(filePath).read()
??????? # Prepare document
??????? document = xapian.Document()
??????? document.set_data(content)
??????? # Store fileName
??????? fileName = os.path.basename(filePath)
??????? document.add_value(xapian_file_name, fileName)
??????? # Index document
??????? indexer.set_document(document)
??????? indexer.index_text(content)??????????????????
???????
??????? #Store indexed content in database
??????? database.add_document(document)
///////////// code? for searching?
??? query = queryParse...
2013 Mar 05
1
Sorting by value - direction
Hi,
I'm trying to sort a list of results alphabetically, but it's coming out in the wrong direction. Indexing is done like this (PHP bindings):
// Tag name as a value (for sorting)
$doc->add_value(2, strtolower($obj->tag));
And searching like this:
$enquire->set_sort_by_value(2);
But for some reason, the results are coming out Z-A, not A-Z. I've tried setting true as the second argument to set_sort_by_value, even though we shouldn't need to reverse the direction because a s...