Sorry for the pollution. Sorting by function will only be possible with
1.5.

In https://issues.apache.org/jira/browse/SOLR-1297,
Grant writes:
"""
Note, there is a temporary workaround for this: (main query)^0
func(...) 
"""

Is that workaround an option for my use case?

Thanks,
Chantal

On Fri, 2010-07-09 at 12:08 +0200, Chantal Ackermann wrote:
> [P.S. to my first post]
> 
> Further contemplating http://wiki.apache.org/solr/FunctionQuery.
> 
> I am using 1.4.1, the date field is configured like this:
> <fieldType name="date" class="solr.DateField" sortMissingLast="true"
> omitNorms="true"/>
> 
> (The schema has been created using the schema file from 1.4.0, and I
> haven't changed anything when upgrading to 1.4.1. TrieDate is said to be
> the default in 1.4, so I would expect this date field to have that
> type?)
> 
> On the wiki page, the following example is listed:
> Example: ms(NOW/DAY)
> Could I do that same thing with my own date?
> ms(start_date/DAY)
> 
> I tried that query:
> http://192.168.2.40:8080/solr/epg/select?qt=dismax&fl=start_date,title&sort=ms%28start_date/DAY%29%20asc,title%20asc
> 
> (search for all *:* configured in solrconfig.xml for dismax)
> 
> I get the following error message back:
> """
> message can not sort on undefined field: ms(start_date/DAY)
> 
> description The request sent by the client was syntactically incorrect
> (can not sort on undefined field: ms(start_date/DAY)).
> """
> 
> I am a complete newbie when it comes to function queries.
> 
> Thanks for any suggestions!
> Chantal
> 
> On Fri, 2010-07-09 at 11:44 +0200, Chantal Ackermann wrote:
> > Dear all,
> > 
> > this is not a new problem, I just wanted to check whether with 1.4 there
> > might have been changes that allow a different approach.
> > 
> > In my query, I retrieve results that have a date field. I have to sort
> > the result by day only, then by a different string field. The time of
> > that date shall not be used for sorting.
> > I cannot filter the results on a certain date (day).
> > 
> > This thread confirms my first thought that I need another field in the
> > index:
> > http://search.lucidimagination.com/search/document/422dc30e0a222c28/sorting_dates_with_reduced_precision#46566037750d7b5
> > 
> > However, is it possible to use the DateMathParser somehow in the
> > function queries?
> > If it's not yet possible - why not:
> > (a) is there are great risk that the performance would be bad? Or some
> > other reason that discourages this solution.
> > (b) simple not implemented
> > 
> > In case of (b), I might try to implement it.
> > 
> > Thanks!
> > Chantal
> > 
> 


Reply via email to