IndexEmbedded として追加されたデータを照会するにはどうすればよいですか?
私はエンティティクラスを持っています
[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; }
}
としての場所
[Indexed]
public class Location
{
/// </summary>
[Field(Index.Tokenized, Store = Store.Yes)]
public virtual string Address
{
}
データが (通常のプロパティと IndexEmbedded の両方で) インデックスに追加され、Luke を使用して表示できます。
ただし、フルテキストを使用してクエリを実行すると、通常のプロパティに対してのみ有効な結果が得られ、IndexedEmbeddedなどでは有効な結果が得られません
。"sample description" => 1 件の結果、" Palo Alto" => 0 件の結果 (どちらもインデックスに含まれています)
これは私のクエリです
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();
私は何か間違っているか、何か不足していますか?