search for: get_term

Displaying 7 results from an estimated 7 matches for "get_term".

2010 Oct 21
2
In-memory databases vs PHP Bindings
.../tmp/xapian/doc'.$postid, Xapian::DB_CREATE_OR_OVERWRITE); $xdb_doc->add_document($xdoc); $xdb_doc->commit(); Also, FYI, the documentation here seems incomplete: http://xapian.org/docs/apidoc/html/classXapian_1_1TermIterator.html I had to inspect the bindings to find the rather useful get_term() method of the TermIterator class! It does mention the use of the * operator to return the current term but I can't see how I'd invoke that in PHP. If the get_term method applies in all environments, it ought to be documented I'd have thought. Andrew
2009 Dec 13
1
Combined search in multiple fields help
...ixes). But how to modify query so it cover two fields in a right way? For a starter how I think about modifying query to limit it just to single globally selected field: 1. after user enters free-text query I parse it as usual via parse_query(), 2. then I iterate through resulting Xapian::Query by get_terms and apend A or S prefix to evey term (after Z if Z is present, and not appending where other prefix is already applied (for example H)). (Btw, is this optimal strategy?) What I think about multiple fields and where it fail: There is two situation depending on default_op(). 'or') I just du...
2007 Apr 03
3
More weirdness with PHP bindings
...erms_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_terms is wrapped (and only appears under windows)... strange. " Anyway, I thought it might be worth raising in case anyone with a better knowled...
2016 May 09
1
Given a document, how do you get its ID? (perl bindings)
I am writing an indexer that will crawl our web site. Following the recommendation here: https://trac.xapian.org/wiki/FAQ/UniqueIds I'm using the URL as the unique ID for each document. I see how to get a document from the xapian database if I know its URL, but what I need is also to be able to find out the URL from the document. Does this mean I need to store the URL in a value in
2010 Jan 16
1
PHP XapianTermIterator/XapianPositionIterator usage
Hello again, /thanks to Peter for previous response. I've been digging around trying to find sample usage of XapianTermIterator/XapianPositionIterator in PHP. The idea is to code up a test case in PHP to perform snippet extraction (with a possible view to coding a pecl extension in C). I found a C++ sample, but that wasn't much help. I must be dense this morning though, since I
2008 Mar 07
2
Trouble using RESTful helper
...eactivate", member_path(member.club, member), :method => :delete %></td> 43: The index action of the controller is just: def index @club = Club.find(params[:club_id]) @members = @club.members.find(:all, :conditions => ["is_active = ?",true]) @term = get_term respond_to do |format| format.html # index.html.erb format.xml { render :xml => @members } end end I can use the same code from the console ok, so the models should be connected properly: >> m = Member.find(:first) => #<Member id: 1, ..... >> m.club =&g...
2010 Aug 28
1
Matchspy and faceting
Have been working recently on a site that classifies posts using tags in taxonomies, so a post about the Oil spill in the Gulf of Mexico might be tagged 'Subscribers only' (access level), 'Barack Obama' (person), 'Tony Hayward' (person), 'BP' (company), 'Transocean' (company), 'Gulf of Mexico' (location). With some advice from Richard Boulton I