Hello List;<br><br>I am trying to implement hibernate search with IndexedEmbedded on my pojos which are associated with manytoone.<br><br>I have two pojo: Diary.java and User.java. the related code segments are listed below:<br>
<br><br>=================Diary.java=======================<br><br>@Entity(name=&quot;tr.com.yazmanak.portal.dal.yazmanak.diary.Diary&quot;)<br><br>@Table(name=&quot;yazmanak_diary&quot;)<br>@Indexed<br>public class Diary extends BasePojo{<br>
    @ManyToOne<br>    @JoinColumn(name=&quot;user_fk&quot;)<br>    @IndexedEmbedded<br>    private User user;<br><br>/* other columns and getter/setter functions omitted*/<br><br>}<br><br><br><br><br><br>=================User.java=======================<br>
<br> */<br>@Entity(name=&quot;tr.com.yazmanak.portal.dal.user.User&quot;)<br><br>@Table(name=&quot;yazmanak_user&quot;)<br>@Indexed<br>public class User extends BasePojo {<br><br>    @Column(name=&quot;name&quot;)<br>    @Field(name=&quot;name&quot;,index=Index.TOKENIZED,store=Store.NO)<br>
    @FieldBridge(impl=StringBridge.class)<br>    private String name;<br>    <br>    @OneToMany(mappedBy=&quot;user&quot;,fetch=FetchType.LAZY,targetEntity=Diary.class)<br>    @ContainedIn<br>    private Set&lt;Diary&gt; diaries;<br>
<br>}<br><br><br><br><br>I want to search user name while searching on Diary class. My search test class is below:<br><br>==================SearchTest.java===================<br><br>public class SearchTest{<br>    <br>    public static List searchByKeyword2(FullTextSession fs) throws org.apache.lucene.queryParser.ParseException {<br>
        org.apache.lucene.queryParser.QueryParser parser = <br>            new QueryParser(&quot;id&quot;, new StandardAnalyzer() );<br><br>        org.apache.lucene.search.Query luceneQuery = parser.parse( &quot;user.name:halil And content:veli&quot;);<br>
        org.hibernate.Query fullTextQuery = fs.createFullTextQuery( luceneQuery,Diary.class );<br>        List result = fullTextQuery.list(); //return a list of managed objects  <br>        return result;<br>    }<br>    <br>
}<br><br><br>=====================end of codes========================<br><br><br>I want to do search with <a href="http://user.name">user.name</a> whike querying onn Diary pojo. But i couldnt. I search the net for 2 days. Some people encounter the same problem and some solves also.<br>
<br>but i couldnt what is the problem? any help? By the way, i can search on other columns but i couldnt search on associated columns such as manytone. for example, above one.<br><br><br>thank you very much,<br><br>regards,<br>
<br>-Halil AĐIN<br><br><br>