I can’t seem to find a solution on a problem I have with Nhibernate
Search and Lucene. Basically I want to be able to search a collection
(many-to-many) on an object, but the collection does not seem to get
indexed. I’ve checked with Luke.

I’m only interested in doing searches on MyObject, but also queries
like MyOtherObjects.Name : Whatever.

My domain looks something like this

    [Indexed]
    public class MyObject
    {
        [IndexedEmbedded]
        private readonly ISet<MyOtherObject> m_otherObjects;

        public IEnumerable< MyOtherObject > MyOtherObjects
        {
            get { return m_otherObjects; }
        }

        [DocumentId]
        public Guid Id { get; set; }

        [Field(Index.Tokenized, Store = Store.Yes)]
        public string Name { get; set;
    }

    public class MyOtherObject
    {
        private readonly ISet< MyObject > m_myobjects;

        public IEnumerable< MyObject > MyObjects
        {
            get { return m_ myobjects; }
        }

        public Guid Id { get; set; }

        [Field(Index.Tokenized, Store = Store.Yes)]
        public string Name { get; set;
    }

But when I save a instance of MyObject all the info except the items
in my ISet<MyOtherObject>. Is it possible to do this kind of indexing?
Acording to Ayende it seems to be possible.
http://ayende.com/Blog/archive/2009/05/03/nhibernate-search-again.aspx

Have a nice day!

Regards
Erik

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to