> 1) While doing a dismax query, I specify the query in double quotes for
> exact match. This works fine but I don't get any partial matches in search
> result.

Rather than specify your query in quotes for 'exact' matches, I was suggesting 
configuring the analyzers differently for your fields "core1_title_exact" and 
"core1_title_partial". -- oops, except I don't think I meant analyzers, I mean 
differnet class types in solr. 

But again, it depends on what you mean by 'exact' -- do you mean it must match 
the whole string start to finish?  If so, if you make the *_exact fields in 
schema.xml use a "string" solr.StrField instead of a  "text" solr.TextField, 
then querries will only match in those fields if they are _exact_, covering the 
whole indexed string start to finish, all punctuation and spaces etc exactly 
the same. (You could use some analyzers to say lowercase, remove punctuation, 
and normalize whitespace to make it a _bit_ more forgiving). No need for 
quoting the query, it'll only match if it's exact. 

Oops, except I just realized this isn't neccesarily true, sorry, because of the 
way the dismax query parser will deal with whitespace in the query. Hmm. 

If what you mean by 'exact' is just a phrase search, then you don't need the 
seperate *_exact fields in the first place, you can just use dismax 'ps' param 
with the right boost. 

Hmm, I think for the first case where 'exact' really does mean 'exact' (not 
phrase), you might be able to combine the _exact field configured as a 
solr.StrField, with the 'ps' technique, only mention the _exact fields in the 
dismax 'ps', not the dismax 'qf'.  

I'm not completely sure any of this will work, just giving you some ideas of 
how I'd try approaching it if it were me. 

> If the frequency of search term is more in "core2_content_exact" field,
> eventhough the search term is present atleast once in the field
> "core1_content_exact" I get "core2_content_exact" as my first search result
> item.

I'm surprised this is true with such gigantic boosts, but I'm not sure what to 
do about it, sorry. Although I guess the boosts I suggested aren't that 
different from each other, they just all are multipled by 1000, which won't 
make them so different from each other. You could try making the boosts even 
more ridiculously higher. at each stage than the last, maybe powers of 10.  ^1, 
^10, ^100, ^1000, ^10000.  

Jonathan

Reply via email to