search for: doc_id

Displaying 20 results from an estimated 36 matches for "doc_id".

2006 Dec 01
1
Specify doc_id
Hi list, I wonder if it is possible to specify my own doc_id? I want to have the same doc_id as my fulltexts tables primary keys. Cheers, Henrik
2007 Jan 22
1
Ferret-talk Digest, Vol 15, Issue 8
Hi everyone, thank you for the help last time. A quick question, through rereading the ferret tutorial I realized that by adding :key => :id to the index loading, I could access my documents through index["11"], in addition to using the doc_id from ferret through index[122]... This is great, and saves me a line or two a lot of places in my code. However, is there a way of extracting the doc_id from an object you find like this. Ie I want to know the doc_id for document index["11"]. The reason for this is that I need the doc_id...
2008 Mar 01
3
Possible bug when creating a Ferret::Search::Sort object?
I may have run across a bug in Ferret: if throws a segmentation fault when I try to create a Sort object using the default fields (SCORE and DOC_ID), but setting reverse to true. Here''s the minimal example: #!/usr/bin/env ruby require ''rubygems'' require ''ferret'' Ferret::Search::Sort.new Ferret::Search::Sort.new( [ Ferret::Search::SortField::SCORE, Ferret::Search::SortField::DOC_ID ],...
2007 Jan 29
1
Segmentation fault in Search::Searcher#highlight
...require ''ferret'' include Ferret::Search #searcher = Ferret::Index::Index.new(:path => ''./index'') # works searcher = Searcher.new("./index") # not works! segmentation fault!! query = TermQuery.new(:content, ARGV[0]) searcher.search_each(query) do |doc_id, score| puts "Document #{doc_id} found with a score of #{score}" puts searcher.highlight(query, doc_id, :field => :content) end Do I have some wrong implementation? Help me... -- Posted via http://www.ruby-forum.com/.
2018 Apr 06
1
sorting large msets
...fast - about 0.0001 seconds. > > > This is because in that case we can just stop once we've found 200 > > > matches. With a few million documents, that ENQ_ASCENDING sounds promising :) So, it looks like if I had ideal ordering, I could do something along the lines of: my $doc_id = $db->get_metadata('last_doc_id') || 0xffffffff; $db->replace_document($doc_id--, $_) foreach (@doc); $db->set_metadata('last_doc_id', $doc_id); And get killer performance. Olly Betts <olly at survex.com> wrote: > On Sat, Mar 31, 2018 at 12:58:19AM +0000, Er...
2008 Mar 05
0
Index Searcher Causes GC Memory Error: "irb: double free or corruption"
...age}" end end if self.sub_searchers.size > 0 self.searcher = Ferret::Search::MultiSearcher.new(self.sub_searchers) else self.searcher = (Ferret::I.new).searcher end self.object_type = object_type end # This doc/[] has a different to Index method: argument only wants doc_id [Integer] def doc(doc_id) return self.searcher[doc_id] rescue Exception => e puts "** IndexSearcher(#{object_type}).doc #{doc_id}\n" << e.backtrace.join("\n") return nil end alias :[] :doc ############################# # Querying methods def process_quer...
2006 Sep 26
3
concurrency / #search_each problem / segfault
Hello everyone, I was stress-testing my application (running on Rails via FastCGI) by letting two concurrent users (not human .. an app called ''siege'') a) save an Article and b) search for all Articles. I am searching via Article.ferret_index.search_each( ..) do |doc_id,score| doc = index[doc_id] .. end and writing via Article.ferret_index << self.to_doc where Article.ferret_index is implemented as in ''act_as_ferret'': @@ferret_index = nil def Article::ferret_index @@ferret_index ||= Ferret::Index::Index.new( :path...
2006 Sep 14
2
Possiible Bug ? indexWriter#doc_count countsdeleted docs after #commit
Hi David, > Deleted documents don''t get deleted until commit is called Ok, but FYI, my experiments show that #commit doesn''t affect #doc_count, even across ruby sessions. On a different note, I''d like to request a variation of #add_document which returns the doc_id of the document added, as opposed to self. I''m trying to track down an issue with a large test index [600MB, 500k docs] in which I need to update a document. The old document is deleted then added again, but doesn''t show up in my searches. A #doc_count on the writer before and a...
2007 Mar 28
4
retrieving search result positions
Hi I''m considering using Ferret in v2 of Weft QDA, a wxruby desktop application for textual analysis in social science. Ferret seems a very impressive package that meets and exceeds my requirements, but I can''t find how to retrieve specific details about the results. I''d like to be able to run fairly simple queries. I then need to look at each term match, and get
2006 Jun 22
3
Partition results based on field
Hello all I''m using Ferret for a site wide search where I have several kinds of (similar) objects in a central index (using a "type" field containing the class name). This works great, and I can search all objects with one query. What I''d like to do now is to limit the results so that there will be a maximum of 10 (or 5 or whatever) results for each type.. I
2006 Oct 10
4
Need help for coding an extension to ferret
...) { int i; VALUE rhits = rb_funcall(self, id_hits, 0); VALUE rhit; const int len = RARRAY(rhits)->len; long pos; for (i = 0; i < len; i++) { rhit = RARRAY(rhits)->ptr[i]; pos = FIX2INT(rb_funcall(rhit, id_doc, 0)); // // HERE I WOUlD LIKE TO LOAD THE DOCUMENTS, ID IS THE GOOD DOC_ID.. // I WOULD LIKE TO GET THIS IN FACT (ruby): // doc_id = INDEX.search(''query'').hits.first // INDEX[doc_id].load <== THAT''S WHAT I WOULD LIKE TO GET ! // } rstr = rb_str_new2(str); free(str); return (argv[0]); } of course, i''ve bound the method to t...
2006 Sep 03
9
using highlight from aaf
Hi, I''m trying to use highlight ferret method with trunk aaf and 0.10.1 ferret. In my search display I use: Myindexedclass.ferret_index.searcher.highlight(@query, result_line.id, :content) * searcher is a protected method; how can I access to the searcher from aaf ? * is the doc id in aaf the same as my model id ? * is the first param, query, the string query or the query object ?
2007 May 02
1
MultiSearcher Results Question
...new i2 = Ferret::I.new i1 << {:id=>1,:text=>"random stuff"} i1.commit reader = Ferret::Index::IndexReader.new([i1.options[:dir],i2.options[:dir]]) searcher = Ferret::Index::IndexSearcher.new(reader) query = Ferret::Search::MatchAllQuery.new searcher.search_each(query) do |doc_id,score| puts reader[doc_id][:text] # Anyway to find what index this doc is stored in? end -- Posted via http://www.ruby-forum.com/.
2006 Jul 12
5
Reverse sorting
I am getting strange results when I reverse sort a query. I am sorting by date, but it doesn''t seem to be related to dates (I have tried just integers). I also paginate the results. Items in the result set are sometimes duplicated and the not ordered at all. When I try a non-reverse sort I don''t see duplicates and the ordering is correct. Any ideas what is going on? Thanks
2008 Aug 05
3
HVM iSCSI Boot ROM
Microsoft has their "boot" version of their iSCSI software initiator. Apparently this still requires that the network card be iSCSI Boot "enabled." Intel seems to be the only obvious company out there supporting it on their Server adapters - I was wondering if there are any thoughts/plans on implementing iSCSI Boot functionality in the HVM Boot ROM? Or maybe there''s
2018 Mar 31
2
sorting large msets
Olly Betts <olly at survex.com> wrote: > On Fri, Mar 30, 2018 at 05:21:43PM +0000, Eric Wong wrote: > > Hello, is there a way to optimize sorting by certain values > > for queries which return a huge amount of results? > [...] > > $enquire->set_sort_by_value_then_relevance(0, 1); > > If you're just wanting the 200 newest, it'll be faster not to
2007 Jan 25
0
multibyte character corrupt in highlight method
When I apply highlight() method to the search result, multibyte characters are corrupted. The post_tag is located in the middle of last character, so the last character corrupts. Here is my code. query = "SOME_MULTIBYTE_CHARS" searcher.search_each(query) do |doc_id, score| puts searcher.highlight(query, doc_id, :field => :content) end And this is the result. ... bla, bla, bla, .. <b>SOME_MULTIBYTE_CHARA</b>CTERS ... How can I do?? -- Posted via http://www.ruby-forum.com/.
2006 Jul 06
1
querying returned results
Hi I''m using the acts_as_ferret to index one table in my database. The table contains formation about listed items and each of these items belongs to a section and a category. On the results page I want to have two drop down boxes whose contents are populated depeneding on the returned results. So for example the section drop down should only show sections that exist in the result set,
2004 Nov 22
1
R(D)Com
...Does anybody know where I can find it, or do you have any form of experience of the use of R with Windev? Thanks for your help. PS : As I am new to the group, people interested in some details about the requestor could find his resume at address http://e-doclib.aqte.be/docs-doc-view.php?doc_id=303. Best regards. Constant Depièreux Managing Director Applied Quality Technologies Europe sprl Rue des Déportés 123 B-4800 Verviers +32 87 29 21 75 www.aqte.be ---- Ce message a été scanné avec Norton anti-virus, dernière mise à jour disponible en ligne ----- [[alternative HTML ver...
2006 Oct 19
1
Writing with xapian-tcpsrv and php
Hi, I think, there is missing constructor function supporting remote writing for XapianWritableDatabase class in the php bindings (0.9.7). This code: $db = new XapianWritableDatabase(remote_open($db_host, $db_port), $action); returns: Fatal error: No matching function for overloaded 'new_XapianWritableDatabase' (...) $db = new XapianWritableDatabase($path, $action); works fine.