Hi
I have I request in my search projetct that I do not know if it is possible
to do easily:
If occur matching exact using PharseQuery for example I must add for this
boosting of this field a value of the other field of the document (example
price), but if occur matching partial I must add to one weight dafault (1 for
example).
I thought about duplicating all the searchalble fields in my index
(indexing-time) and I add to the value price in boosting of first field and in
second I add to the value default (1). I create the queries PhaseQuery for any
fields (boosting=price) e create query (TermQuery for exemplo) for other fileds
(boosting = 1). Example:
Document 1:
fieldName1=Michael Jordan (boosting = 1 = fieldboosting1)
fieldName2=Michael Jordan (boosting = 5 = fieldboosting2)
fieldSports1=Ball Baseball (boosting = 1 = fieldboosting1)
fieldSports2=Ball Baseball(boosting = 5 = fieldboosting2)
fieldCountry1=EUA (boosting = 1 = fieldboosting1)
fieldCountry2=EUA (boosting = 5 = fieldboosting2)
fieldboosting1=1
fieldboosting2=5
Document 2:
fieldName1=Pele (boosting = 1 = fieldboosting1)
fieldName2=Pele (boosting = 5 =fieldboosting2)
fieldSports1=Ball Football (boosting = 1 = fieldboosting1)
fieldSports2=Ball Football(boosting = 5 = fieldboosting2)
fieldCountry1=BRA (boosting = 1 = fieldboosting1)
fieldCountry2=BRA (boosting = 5 = fieldboosting2)
fieldboosting1=1
fieldboosting2=5
My query:
exact search: PharseQuery: fieldName2 OR fieldSports2 OR fieldCountry2
OR
partial search: TermQuery: fieldName1 OR fieldSports1 OR fieldCountry1
Is possible do it without duplicated the field. The big solution is set the
boosting in search-time with the value other field. Es possible do it ?
Thanks
Haroldo
_________________________________________________________________
Instale a Barra de Ferramentas com Desktop Search e ganhe EMOTICONS para o
Messenger! É GRÁTIS!
http://www.msn.com.br/emoticonpack