Re: Using QueryElevationComponent without specifying top results?
Just wondering if anyone had any further thoughts on how I might do this? On 26 April 2010 19:18, Oliver Beattie oli...@obeattie.com wrote: Hi Grant, Thanks for getting back to me. Yes, indeed, #1 is exactly what I'm looking for. Results are already ranked by distance (among other things), but we need the ability to manually include a certain result in the set. They wouldn't usually match, because they fall outside the radius of the filter query we use. Most of the resulting score comes from function queries (we have a number of metrics that rank listings [price, feedback score, etc]), so the score from the text search doesn't have *that much* bearing on the outcome. So, yeah, basically, I'm looking for a way to include results that don't match, but have Solr calculate its score as it would if it did match the filter query. Sorry for being so unclear and rambling a bit, I'm struggling to articulate what we want in a clear manner! —Oliver On 26 April 2010 19:13, Grant Ingersoll gsing...@apache.org wrote: On Apr 26, 2010, at 7:53 AM, Oliver Beattie wrote: Hi all, I'm currently writing an application that uses Solr, and we'd like to use something like the QueryElevationComponent, without having to specify which results appear top. For example, what we really need is a way to say for this search, include these results as part of the result set, and rank them as you normally would. We're using a filter to specify which results we want included (which is distance-based), but we really want to be able to explicitly include certain results in certain queries (i.e. we want to include a listing more than 5 miles away from a particular location for certain queries). Is this possible? Any help would be really appreciated :) I'm not following the rank them as you normally would part. If Solr were already finding them, then they would already be ranked and showing up in the results and you wouldn't need to hardcode them, right? So, that leaves a couple of cases: 1. Including results that don't match 2. Elevating results that do match In your case, it sounds like you mostly just want #1. And, based on the context (distance search) perhaps you want those results sorted by distance? Otherwise, how else would you know where to inject the results? The QueryElevationComponent can include the results, although, I must admit, I'm not 100% certain on what happens to injected results given sorting. -- Grant Ingersoll http://www.lucidimagination.com/ Search the Lucene ecosystem using Solr/Lucene: http://www.lucidimagination.com/search
Re: Using QueryElevationComponent without specifying top results?
Hi Grant, Thanks for getting back to me. Yes, indeed, #1 is exactly what I'm looking for. Results are already ranked by distance (among other things), but we need the ability to manually include a certain result in the set. They wouldn't usually match, because they fall outside the radius of the filter query we use. Most of the resulting score comes from function queries (we have a number of metrics that rank listings [price, feedback score, etc]), so the score from the text search doesn't have *that much* bearing on the outcome. So, yeah, basically, I'm looking for a way to include results that don't match, but have Solr calculate its score as it would if it did match the filter query. Sorry for being so unclear and rambling a bit, I'm struggling to articulate what we want in a clear manner! —Oliver On 26 April 2010 19:13, Grant Ingersoll gsing...@apache.org wrote: On Apr 26, 2010, at 7:53 AM, Oliver Beattie wrote: Hi all, I'm currently writing an application that uses Solr, and we'd like to use something like the QueryElevationComponent, without having to specify which results appear top. For example, what we really need is a way to say for this search, include these results as part of the result set, and rank them as you normally would. We're using a filter to specify which results we want included (which is distance-based), but we really want to be able to explicitly include certain results in certain queries (i.e. we want to include a listing more than 5 miles away from a particular location for certain queries). Is this possible? Any help would be really appreciated :) I'm not following the rank them as you normally would part. If Solr were already finding them, then they would already be ranked and showing up in the results and you wouldn't need to hardcode them, right? So, that leaves a couple of cases: 1. Including results that don't match 2. Elevating results that do match In your case, it sounds like you mostly just want #1. And, based on the context (distance search) perhaps you want those results sorted by distance? Otherwise, how else would you know where to inject the results? The QueryElevationComponent can include the results, although, I must admit, I'm not 100% certain on what happens to injected results given sorting. -- Grant Ingersoll http://www.lucidimagination.com/ Search the Lucene ecosystem using Solr/Lucene: http://www.lucidimagination.com/search
Getting the length of a field?
Hi there, I'm looking around to see if there's a function that will return the length of a string in a field, but not seeing one. This is a field whose data I store, but don't use for querying generally, but I want to be able to take its length into account. Is this possible? Any help much appreciated :) —Oliver
Re: Combining frange with other query parameters?
Can anyone help me out with this? It'd be really appreciated :) 2010/1/7 Oliver Beattie oli...@obeattie.com Hey, I'm doing a query which involves using an frange in the filter query — and I was wondering if there is a way of combing the frange with other parameters. Something like ({!frange l=x u=y)*do stuff*) AND *field:param*) — but obviously this doesn't work. Is there a way of doing this? —Oliver
Combining frange with other query parameters?
Hey, I'm doing a query which involves using an frange in the filter query — and I was wondering if there is a way of combing the frange with other parameters. Something like ({!frange l=x u=y)*do stuff*) AND *field:param*) — but obviously this doesn't work. Is there a way of doing this? —Oliver
Question regarding scoring/boosting
Hey everyone, I'm what one would probably call a beginner with Solr. I have my data loaded in and I am getting the hang of querying things. However, I'm still rather unclear as to how the score can be affected by various parameters. I'm using the dismax request handler, and I just don't quite get how doing foo^value in the bf affects the score. Perhaps if someone could explain this at a basic level or point me in the direction of some documentation as to how this affects the final score this would be very helpful. Thanks, Oliver
Re: Function queries question
Thanks for getting back to me. I've added inline responses below. 2009/11/20 Grant Ingersoll gsing...@apache.org On Nov 20, 2009, at 3:15 AM, Oliver Beattie wrote: Hi all, I'm a relative newcomer to Solr, and I'm trying to use it in a project of mine. I need to do a function query (I believe) to filter the results so they are within a certain distance of a point. For this, I understand I should use something like sqedist or hsin, and from the documentation on the FunctionQuery page, I believe that the function is executed on every row (or record, not sure what the proper term for this is). So, my question is threefold really; are those functions the ones I should be using to perform a search where distance is one of the criteria (there are others), Short answer: yes. Long answer: I just committed those functions this week. I believe they are good, but feedback is encouraged. I'll be sure to let you know if I find anything report-worthy :) They're definitely super-useful for people doing similar things to I though, so great work :) and if so, does Solr execute the query on every row (and again, if so, is there any way of preventing this [like subqueries, though I know they're not supported])? You can use the frange capability to filter first. See http://www.lucidimagination.com/blog/tag/frange/ Thanks for the link. I'll definitely do that. Does Solr execute the function on every row in the database on every query otherwise? Here's an example from a soon to be published article I'm writing: http://localhost:8983/solr/select/?q=*:*amp;fq={!frange l=0 u=400}hsin(0.57, -1.3, lat_rad, lon_rad, 3963.205) This should filter out all documents that are beyond 400 miles in distance from that point on a sphere (specified in radians, see also the rads() method) Sorry if this is a little confusing… any help would be greatly appreciated :) No worries, a lot of this spatial stuff is still being ironed out. See https://issues.apache.org/jira/browse/SOLR-773 for the issue that is tracking all of the related issues. The pieces are starting to come together and I'm pretty excited about it b/c not only will it bring native spatial support to Solr, it will also give Solr some exciting new general capabilities (sort by function, pseudo-fields, facet by function, etc.)
Function queries question
Hi all, I'm a relative newcomer to Solr, and I'm trying to use it in a project of mine. I need to do a function query (I believe) to filter the results so they are within a certain distance of a point. For this, I understand I should use something like sqedist or hsin, and from the documentation on the FunctionQuery page, I believe that the function is executed on every row (or record, not sure what the proper term for this is). So, my question is threefold really; are those functions the ones I should be using to perform a search where distance is one of the criteria (there are others), and if so, does Solr execute the query on every row (and again, if so, is there any way of preventing this [like subqueries, though I know they're not supported])? Sorry if this is a little confusing… any help would be greatly appreciated :) Thanks, Oliver