more field advocacy

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

more field advocacy

Karl Wettin-3
The TermFreqVector.getTermFrequencies always return the same value as
TermDocs.freq, even if a field was set not to be added to the term
frequency vector.

Is this really the way it should be? It makes the fields even more
confusing than my prior post on the subject.


doc.add(new Field("foo", "bar", Store.NO, Index.TOKENIZED,
TermVector.YES));
doc.add(new Field("foo", "bar", Store.NO, Index.TOKENIZED,
TermVector.NO));

Vector frequency of [foo, bar] is 2. I would expect it to be 1 or a
field setting inconsistency warning.

Perhaps this is true also with Store and Index? I'll have to take a look
at that.

I'm OK with the settings being by field name, but the current design
really don't imply that. It implies multidimensional settings, one per
instance of Field. And that could be a nice thing to have.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: more field advocacy

Karl Wettin-3
On Sun, 2006-05-07 at 12:00 +0200, karl wettin wrote:

>
> doc.add(new Field("foo", "bar", Store.NO, Index.TOKENIZED,
> TermVector.YES));
> doc.add(new Field("foo", "bar", Store.NO, Index.TOKENIZED,
> TermVector.NO));
>
> Vector frequency of [foo, bar] is 2. I would expect it to be 1 or a
> field setting inconsistency warning.
>
> Perhaps this is true also with Store and Index? I'll have to take a
> look at that.

"Once setting, always setting" goes for Index too.

If someone can tell me what settings are global and what settings are
not global I'll patch and depricatate:

[Document]<#>-- {0..*} ->[FieldValue]--->[Field +index +vector]


What is per value and what is per field?

  private boolean storeTermVector = false;
  private boolean storeOffsetWithTermVector = false;
  private boolean storePositionWithTermVector = false;
  private boolean omitNorms = false;
  private boolean isStored = false;
  private boolean isIndexed = true;
  private boolean isTokenized = true;
  private boolean isBinary = false;
  private boolean isCompressed = false;


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]