-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Boosting @IndexEmbedded?
PostPosted: Mon Sep 24, 2007 2:05 pm 
Newbie

Joined: Thu Sep 13, 2007 10:36 am
Posts: 8
Can you boost a list marked up with IndexedEmbedded? Or we going to need to create a FieldBridge to boost the fields individually?

We have classes the look like (example is missing properties and methods not related to search - Class B is not being indexed, just its one property):

Code:
@Indexed
Class A {
   private List<B> blist;

   @IndexedEmbedded
   public List<B> getBList() {
      return blist;
   }
}

Class B {
    private String data;

    @Field(index=Index.TOKENIZED)
    public String getData() {
        ...
    }
}


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 01, 2007 11:27 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
putting @Boost on the property marked as @IndexedEmbedded should work, let us know otherwise and we will fix that

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 30, 2007 9:54 am 
Newbie

Joined: Mon Oct 22, 2007 7:04 am
Posts: 19
Well ... unfortunately it does not. At least not when the depth is more than one.

I have

Code:
Foo {
  @IndexEmbedded(depth=2)
  @Boost(2.0F)
  Bar getMainBar();

  @IndexEmbedded(depth=2)
  @Boost(0.1F)
  Set<Bar> getComplementaryBars();
}


Where Bar is like

Code:
Bar {
  @IndexEmbedded(depth=2)
  Set<Syn> getSynonyms();   
}


And finally Syn is like

Code:
Syn {
   @Field
   getSynonym();
}


The generated indexes will show (when inspecting with Luke)

Code:
Field: mainBar.synonyms.synonym           Boost:1.0
Field: compementaryBars.synonyms.synonym  Boost:1.0


Expected result is:

Code:
Field: mainBar.synonyms.synonym           Boost:2.0
Field: compementaryBars.synonyms.synonym  Boost:0.1


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 30, 2007 11:52 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I know Luke has a bug in this area, I would appreciate if you could confirm that with a real query.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 02, 2007 6:05 am 
Newbie

Joined: Mon Oct 22, 2007 7:04 am
Posts: 19
Ok ... I will investigate it further.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.