According to my IndexReader's field_infos, all the fields are stored
and indexed, with :with_positions_offsets for the term_vectors.

A look at a term vector for one of these :data fields gives:

#<struct Ferret::Index::TermVector field=:data, terms=[], offsets=nil>

Is this what they look like when you index with :index=>no?


On 6/12/07, Jens Kraemer <[EMAIL PROTECTED]> wrote:
> On Tue, Jun 12, 2007 at 11:46:02AM -0400, Richard Jones wrote:
> > Follow-up to my recent post with the same subject:
> >
> > It seems that within the API scripting world I can view the suspect
> > document by instantiating and then loading the LazyDoc returned by
> > Ferret::Search::Searcher.get_document(doc_id).  It contains the :data
> > field data and is perhaps what is being used by the browser.
> >
> > So my question is then this:  what would cause a document in an index
> > to have a non-empty field when looked at through a LazyDoc, but for
> > which no non-empty term_vector is available for the same field on the
> > same document?
>
> having the field data stored in the index does not imply that this field
> is searchable. It all depends what options are set for the field (see
> the FieldInfos api docs for the available options)
>
> So it's perfectly possible to create an index with fields f1 and f2,
> where only f1 can be searched, but the contents of f2 can be shown for
> search results:
>
> fi = Ferret::Index::FieldInfos.new
> fi.add_field :f1, :store => :yes, :index => :yes
> fi.add_field :f2, :store => :yes, :index => :no, :term_vector => :no
> i = Ferret::I.new :field_infos => fi
> i << { :f1 => 'field one' , :f2 => 'field two' }
>
> i.search 'one' # finds the document
> i.search 'two' # won't find anything
>
>
> i[0][:f1] # outputs 'field one'
> i[0][:f2] # outputs 'field two'
>
>
> However that does not explain why some documents seem to have other
> indexing options than the rest - maybe yo uchanged them some time
> without doing a rebuild?
>
>
> Jens
>
>
>
> --
> Jens Krämer
> webit! Gesellschaft für neue Medien mbH
> Schnorrstraße 76 | 01069 Dresden
> Telefon +49 351 46766-0 | Telefax +49 351 46766-66
> [EMAIL PROTECTED] | www.webit.de
>
> Amtsgericht Dresden | HRB 15422
> GF Sven Haubold, Hagen Malessa
> _______________________________________________
> Ferret-talk mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/ferret-talk
>


-- 
Richard Jones
[EMAIL PROTECTED]
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to