How do I query for data added as IndexEmbedded
I have an entity class
[Indexed]
public class Something
{
[Field(Index.Tokenized, Store = Store.Yes)]
public virtual string Description { get; set; }
[IndexedEmbedded]
public virtual Category Category { get; set; }
[IndexedEmbedded]
public virtual Location Location { get; set; }
}
Location as
[Indexed]
public class Location
{
/// </summary>
[Field(Index.Tokenized, Store = Store.Yes)]
public virtual string Address
{
}
Data gets added(both for normal properties and IndexEmbedded) to the index
and I can see them using Luke.
However when I query using Fulltext I get valid results only for the normal
properties and not for IndexedEmbedded
e.g. "sample description" => 1 result, " Palo Alto" => 0 results(both of
them are in the index)
This is my query
using (IFullTextSession s =
Search.CreateFullTextSession(NHibernateSession.GetSession()))
{
MultiFieldQuerParser qp = new MultiFieldQueryParser(new[] {
“Description”,“Title”,”Name”
}, new
StandardAnalyzer());
IQuery NHQuery = s.CreateFullTextQuery(qp.Parse(query), typeof(
Something));
result = NHQuery.List();
Am I doing something wrong or missing anything?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---