On 8 October 2011 00:21, helix84 <heli...@centrum.sk> wrote: > > RE #2: You could use query-time boosting to boost the relevance of the > > 'fulltext' field... I don't have an example of the top of my head but I > > think this should be possible... maybe even combining your original query > > with a fulltext:{query}^10 (where '10' is the boost value... this is > > probably too high! but suffices for demo purposes.) > > Thanks Kim, that's what I was looking for. Your comment about the > boost value being too high - does it matter at all if the two OR-ed > queries are identical?
It doesn't really matter as long as you don't plan on using boosting for anything else... the default boost is 1.0, and you can use values between 0 and 1 as well (eg. 0.2) so it's probably good practice to pick something like 1.5 so that it's enough to keep the results above the rest, but also enough wiggle room on either side should you decide to boost some other terms/queries/fields in the future. I don't know why I picked 10 as an example ;) > I'll try to integrate this into the discovery search interface as > optional checkbox, (on by default in my repository). Would others also > be interested in this functionality? Should I submit a patch? Sounds interesting, I'd certainly be keen to see how it optimises searching in DSpace. A patch would be great, I'm happy to help with testing. Here are some Apache docs that might help: http://wiki.apache.org/solr/SolrRelevancyCookbook http://wiki.apache.org/solr/SolrRelevancyFAQ http://lucene.apache.org/java/2_4_0/queryparsersyntax.html#Boosting a Term http://wiki.apache.org/solr/SolrQuerySyntax Note that right now, we're passing our boost in as part of the query string Discovery uses to construct the full Solr query/url. If you want this to be a persistent "option" when searching, and keep the search box clean, you'll probably need to look at the way the Solr query is constructed and stored in discovery-xmlui-api Cheers, Kim ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 _______________________________________________ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech