0

I have one search field where user can search products based on three fields : productCFN (String type), productBrand (String type) and productUpnName (text type). I am giving boost value based on priority so that result will come at the same order (highest boost value to lowest boost value).

But search behavior is not working as expected (sometimes). I have given boost value like that

productCFN 100 [we have customize the boost value based on value given for search field]

productBrand 20

productUpnName 50

So if i am searching, it should first search by productCFN then productUpnName then productBrand and at the same order result will be shown in the front end

I have checked the query as well, seems that its correct, but don't know why ordering is not working (I searched with 'CC0')

q=(productUpnName_text_en_us:(CC0~^25.0+OR+cc0~^25.0+OR+cc0^100.0+OR+CC0^100.0+OR+CC0*^50.0+OR+cc0*^50.0))+OR+(productCFN_string:(cc0^200.0+OR+CC0*^100.0+OR+CC0^200.0+OR+cc0*^100.0))+OR+(productBrand_string_mv:(CC0^40.0+OR+cc0*^20.0+OR+cc0^40.0+OR+CC0*^20.0))

My Problem is why products are not coming on the top whose productCFN starts with 'CC0' even if i have given highest score to productCFN.

I think the whole problem is creating because of proximity, but I am already giving least score value still sometime resule is showing in the wrong order.

I am using StandardTokenizerFactory Tokenizer which tokenizes on whitespace, as well as strips characters. Does it really suits with my requirement or It is better to use KeywordTokenizerFactory ?

I have also searched for DISMAX and EDISMAX. Does it really affect the result if use with the proximity and boost value.

Lets take one more example, I have one product with productCFN X0406295L and I start search by X04 but it is showing wrong product on the top.

productCFN - 176-504 productUpnName - CASE 176-504 ATLANTIS SCREW TRAY FA

I am surprised why it is searching for the above product even though that product doesn't have any brand and UPN Name also doesn't contains X04 word. Does it really tokenizing based on number because 04 is there. I am totally confuse with the solr search.

Please help me.

sehe
  • 374,641
  • 47
  • 450
  • 633
Free-Minded
  • 5,322
  • 6
  • 50
  • 93

1 Answers1

0

Your problem is use of String vs Text. By default a String field would not be tokenised.

You should do searches on Text and you should use String for Facets etc.

  • I know how String and Text working with Solr. Text generally use tilde (~) in search query but here my problem is Boosting – Free-Minded May 28 '15 at 03:20