2
다음 멀티 맵 인덱스가 주어지면 쿼리에서 TypeA
유형의 엔티티를 어떻게 제외시킬 수 있습니까?쿼리 결과에서 엔티티 유형을 제외 할 수있는 방법
지수 : 나는
session.Advanced.LuceneQuery<ISharedInterface, IndexType>()
.Not.WhereEquals("@metadata.Raven-Entity-Name",
Session.Advanced.DocumentStore
.Conventions.GetTypeTagName(typeof(TypeA)));
을 시도했습니다하지만
이필드는 'metadata.Raven - 엔티티 - 이름 @'색인되지 않은 오류를 얻을
AddMap<TypeA>(docs => from doc in docs select new { doc.Title, doc.DatePublished, Query = new object[] { doc.Title, doc.Body, doc.Tags } }); AddMap<TypeB>(docs => from doc in docs select new { doc.Title, doc.DatePublished, Query = new object[] { doc.Title, doc.Body, doc.Tags } }); Index("@metadata.Raven-Entity-Name", FieldIndexing.Default);
감사합니다. 태그 '라고해야합니까? –
아니요, 원하는대로 호출 할 수 있습니다. – synhershko
Raven Studio의'Tag : TypeAs' 쿼리는 멋지지만,'-Tag : TypeAs' 조건을 부정하려하면 결과가 반환되지 않습니다. 어떤 생각? 인덱스가 오래되지 않습니다. –