Re: Possible to sort in .xml file?

2011-03-11 Thread Andy Newby
Hi,

Ah cool - missed that bit! Will give that a go (as it will be handy for
passing along other paramaters too)

Cheers

Andy


On Thu, Mar 10, 2011 at 9:13 PM, Chris Hostetter
hossman_luc...@fucit.orgwrote:


 : I know its possible to do via adding sort= , but the Perl module
 : (WebService::Solr) doesn't seem to offer the option to pass in this value
 :(

 according to the docs, you can pass any query params you want to the sort
 method...


 http://search.cpan.org/~bricas/WebService-Solr-0.11/lib/WebService/Solr.pm#search%28_$query,_\%options_%29

  All key-value pairs supplied in \%options are serialzied in the request
  URL.


 -Hoss




-- 
Andy Newby
a...@ultranerds.com


Re: Possible to sort in .xml file?

2011-03-10 Thread Markus Jelsma
Is there no generic parameter store in the Solr module you can use for passing 
the sort parameter? If not, you can define your sort parameter as default in 
the request handler you use in solrconfig. See the shipped config for 
examples.

On Thursday 10 March 2011 11:25:01 Andy Newby wrote:
 Hi,
 
 I'm trying to setup Solr so that we can sort using:
 
 document_views asc,score
 
 ...is this possible via the solrconfig.xml/schema.xml file?
 
 I know its possible to do via adding sort= , but the Perl module
 (WebService::Solr) doesn't seem to offer the option to pass in this value
 :(
 
 TIA

-- 
Markus Jelsma - CTO - Openindex
http://www.linkedin.com/in/markus17
050-8536620 / 06-50258350


Re: Possible to sort in .xml file?

2011-03-10 Thread Markus Jelsma
No, look for request handlers.

  requestHandler name=search class=solr.SearchHandler default=true
!-- default values for query parameters can be specified, these
 will be overridden by parameters in the request
  --
 lst name=defaults
   str name=echoParamsexplicit/str
   int name=rows10/int
 /lst
!-- In addition to defaults, appends params can be specified
 to identify values which should be appended to the list of
 multi-val params from the query (or the existing defaults).
  --
!-- In this example, the param fq=instock:true would be appended to
 any query time fq params the user may specify, as a mechanism for
 partitioning the index, independent of any user selected filtering
 that may also be desired (perhaps as a result of faceted searching).

 NOTE: there is *absolutely* nothing a client can do to prevent these
 appends values from being used, so don't use this mechanism
 unless you are sure you always want it.
  --
!--
   lst name=appends
 str name=fqinStock:true/str
   /lst
  --


etc... You can add any valid parameter there as default.

http://svn.apache.org/repos/asf/lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml

On Thursday 10 March 2011 11:34:47 Andy Newby wrote:
 Hi,
 
 Thanks for the quick reply!
 
 I did a quick look in the solrconfig.xml file, but can't see anything about
 sort, appart from:
 
!-- An optimization that attempts to use a filter to satisfy a search.
  If the requested sort does not include score, then the filterCache
  will be checked for a filter matching the query. If found, the
 filter
  will be used as the source of document ids, and then the sort will
 be
  applied to that.
 useFilterForSortedQuerytrue/useFilterForSortedQuery
--
 
 
 TIA
 
 Andy
 
 On Thu, Mar 10, 2011 at 10:33 AM, Markus Jelsma
 
 markus.jel...@openindex.iowrote:
  Is there no generic parameter store in the Solr module you can use for
  passing
  the sort parameter? If not, you can define your sort parameter as default
  in
  the request handler you use in solrconfig. See the shipped config for
  examples.
  
  On Thursday 10 March 2011 11:25:01 Andy Newby wrote:
   Hi,
   
   I'm trying to setup Solr so that we can sort using:
   
   document_views asc,score
   
   ...is this possible via the solrconfig.xml/schema.xml file?
   
   I know its possible to do via adding sort= , but the Perl module
   (WebService::Solr) doesn't seem to offer the option to pass in this
   value
   
   :(
   
   TIA
  
  --
  Markus Jelsma - CTO - Openindex
  http://www.linkedin.com/in/markus17
  050-8536620 / 06-50258350

-- 
Markus Jelsma - CTO - Openindex
http://www.linkedin.com/in/markus17
050-8536620 / 06-50258350


Re: Possible to sort in .xml file?

2011-03-10 Thread Chris Hostetter

: I know its possible to do via adding sort= , but the Perl module
: (WebService::Solr) doesn't seem to offer the option to pass in this value :(

according to the docs, you can pass any query params you want to the sort 
method...

http://search.cpan.org/~bricas/WebService-Solr-0.11/lib/WebService/Solr.pm#search%28_$query,_\%options_%29

 All key-value pairs supplied in \%options are serialzied in the request 
 URL.


-Hoss