chriseldredge / Lucene.Net.Linq

LINQ provider to run native queries on a Lucene.Net index
Other
151 stars 65 forks source link

Support for TermVector and Boosting in the FieldAttribute #12

Closed hydr closed 11 years ago

hydr commented 11 years ago

If would be great if the FieldAttribute and the FieldMapper would support the setting of a TermVector and a Boost value. Right now we're using these settings on some fields and they don't seem to be supported by the POCO <-> document mapping.

In our document we have the command:

doc.Add(new Field("MediumName", model.MediumName, Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.YES) {Boost = 2f});
chriseldredge commented 11 years ago

Boost is easy to support. I can add an attribute property for TermVector support, but how would you retrieve the information from LINQ? Pseudo code samples or real code welcome.

chriseldredge commented 11 years ago

See TermVectorTests.cs for an example of how to retrieve term vectors.

hydr commented 11 years ago

Thanks for the quick reaction! I will try out your changes in the next days and report on my success! :+1: