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?