Thanks for the clarification Erick!

On Mon, Aug 22, 2011 at 4:30 PM, Erick Erickson <erickerick...@gmail.com>wrote:

> OK, I think I get it now. There's nothing in Solr that I know of that'll
> let you
> do this. Although you could add a clause boosted insanely high, something
> like date_modified:[aug10 TO aug 20]^10000 that would bubble your target
> results toward the top of your list... Note, that's not the correct
> date syntax...
>
> You'd probably have to have your app do the fine-grained sorting, that
> is of the,
> say, 20 docs returned in your list, sort them by your aug10-20 dates.
>
> Best
> Erick
>
> On Mon, Aug 22, 2011 at 10:07 AM, Sowmya V.B. <vbsow...@gmail.com> wrote:
> > Hi Eric
> >
> > Let me clarify:
> >
> > 1) The user gives a query, and also has an option to choose the "from"
> and
> > "to" values for a specific field.
> > (For Eg: Give me all documents that match the query Solr Users, but with
> > those that were last updated between 10th and 20th of August ranked on
> top)
> >
> > -Over here, I am currently using a BoostQuery functionality, to do this.
> > However, along with this, I want to provide an additional option of
> Sorting
> > these "boosted" results based on that range chosen above.
> >
> > 2) I don't want to use an Fq option because, it will filter out the
> > documents not within this range. I want the all the results relevant to
> the
> > query, with an option to put a sorted list of documents, that satisfy the
> > range requirements.
> >
> > I hope I made my query clearer now.
> >
> > S.
> >
> > On Mon, Aug 22, 2011 at 4:01 PM, Erick Erickson <erickerick...@gmail.com
> >wrote:
> >
> >> I guess I'm having trouble understanding this. "I just wanted all the
> >> results,
> >> along with an option to sort the results, if the user wants it."
> >>
> >> What does "all the results" mean? The results you would have had if it
> >> you didn't have a sort? There's no way to guarantee that the results
> >> returned
> >> by relevance contain the range you want, unless you really
> >> do return all the results, possibly thousands to millions of documents.
> >>
> >>
> >> If you used an fq clause, the app could sort the results without
> executing
> >> another search if you wanted to sort them by date...
> >>
> >> Best
> >> Erick
> >>
> >>
> >> On Mon, Aug 22, 2011 at 3:56 AM, Sowmya V.B. <vbsow...@gmail.com>
> wrote:
> >> > Dear All
> >> >
> >> > I have been searching on how to sort Solr results based on a range
> >> > query..but did not find decipherable answers. Hence, mailing again.
> Sorry
> >> if
> >> > the query was already posed -i was not able to find it.
> >> >
> >> > I want to add an option to sort the results, based on a field range
> >> chosen.
> >> > (For eg: "Sort Results based on the Field A, being from 20 to 30",
> "Sort
> >> in
> >> > such a way that the date field points to dates between August 1st to
> >> 10th"
> >> > etc)
> >> >
> >> > I don't want to Filter the results. I just wanted all the results,
> along
> >> > with an option to sort the results, if the user wants it.
> >> >
> >> > Is there anything in Solr, the allows me sort by range?
> >> >
> >> > I Tried giving something like this, following the Sort-without-range
> >> > specification syntax, and needless to say, it threw me syntax error.
> >> >
> >>
> http://localhost:8080/ir4llsolr/select?indent=on&version=2.2&q=xyz&start=0&rows=10&fl=title%2Cdate&sort=Field1:[20TO
> >> > 30] asc
> >> >
> >> >
> >>
> http://localhost:8080/ir4llsolr/select?indent=on&version=2.2&q=xyz&start=0&rows=10&fl=title%2Cdate&sortBy=Field1:[20TO
> >> > 30] asc
> >> > -Does not throw a Syntax error,  but does not seem to work anyways.
> >> >
> >> > Thanks for the help!
> >> >
> >> > Sowmya.
> >> >
> >> > --
> >> > Sowmya V.B.
> >> > ----------------------------------------------------
> >> > Losing optimism is blasphemy!
> >> > http://vbsowmya.wordpress.com
> >> > ----------------------------------------------------
> >> >
> >>
> >
> >
> >
> > --
> > Sowmya V.B.
> > ----------------------------------------------------
> > Losing optimism is blasphemy!
> > http://vbsowmya.wordpress.com
> > ----------------------------------------------------
> >
>



-- 
Sowmya V.B.
----------------------------------------------------
Losing optimism is blasphemy!
http://vbsowmya.wordpress.com
----------------------------------------------------

Reply via email to