Re: How to search multiphrase or a middle term in a word???

2008-03-05 Thread nithyavembu
Thanks Hoss. As you said i tried NGrimTokenizer, but still i didnt get the result. I just added tokenizer class=solr.NGramTokenizerFactory minGram=1 maxGram=1/ in schema.xml during indexing and querying. But it didnt work. But after added this tokenizer this scenario also didnt

JSONRequestWriter

2008-03-05 Thread Doug Steigerwald
We're using localsolr and the RubyResponseWriter. When we do a request with the localsolr component in our requestHandler we're seeing issues with the display of a multivalued field when it only has one value. 'class'=['showtime']'showtime', -- 'genre'=['Drama',

Re: JSONRequestWriter

2008-03-05 Thread Yonik Seeley
Thanks Doug, I just checked in your fix. This was a recent bug... writing of SolrDocument was recently added and is not touched by normal code paths, except for distributed search. -Yonik On Wed, Mar 5, 2008 at 9:29 AM, Doug Steigerwald [EMAIL PROTECTED] wrote: We're using localsolr and the

Re: JSONRequestWriter

2008-03-05 Thread Doug Steigerwald
Sweet. Thanks. Doug Yonik Seeley wrote: Thanks Doug, I just checked in your fix. This was a recent bug... writing of SolrDocument was recently added and is not touched by normal code paths, except for distributed search. -Yonik On Wed, Mar 5, 2008 at 9:29 AM, Doug Steigerwald [EMAIL

Ranking search results by content type

2008-03-05 Thread James Wiegand
Hi there, What I am trying to do is get search results sorted by content type, since there is an order in which results are preferred, for example: * Topics * Postings * Replies * News in that order. The content type is encoded in a type field that is stored in the document. Am I right in

Re: JSONRequestWriter

2008-03-05 Thread Doug Steigerwald
Note that we now have to add a default param to the requestHandler: requestHandler name=/search class=org.apache.solr.handler.component.SearchHandler lst name=defaults str name=echoParamsexplicit/str str name=json.nlmap/str /lst arr

Unparseable date

2008-03-05 Thread Daniel Andersson
Hi people I've got a date(time] indexed with every document, defined as: field name=datetime_found type=date indexed=true multiValued=false / According to the schema.xml-file The format for this date field is of the form 1995-12-31T23:59:59Z. Yet I'm getting the following error on SOME

Re: JSONRequestWriter

2008-03-05 Thread Yonik Seeley
On Wed, Mar 5, 2008 at 11:25 AM, Doug Steigerwald [EMAIL PROTECTED] wrote: If you don't add the json.nl=map to your params, then you can't eval() what you get back in Ruby (can't convert String into Integer). Can you show what the problematic ruby output is? json.nl=map isn't the default

Re: Unparseable date

2008-03-05 Thread Ryan Grange
Solr does use 24 hour dates. Are you positive there are no extraneous characters at the end of your date string such as carriage returns, spaces, or tabs? I have the same format in the code I've written and have never had a date parsing problem (yet). Ryan Grange, IT Manager DollarDays

Re: JSONRequestWriter

2008-03-05 Thread Doug Steigerwald
Sure. The default (json.nl=flat): 'response',{'numFound'=41,'start'=0, Adding json.nl=map makes output correct: 'response'={'numFound'=41,'start'=0, This also changes facet output (which was evaluating fine): FLAT: 'facet_counts',{ 'facet_queries'={},

Re: JSONRequestWriter

2008-03-05 Thread Yonik Seeley
The output you showed is indeed incorrect, but I can't reproduce that with stock solr. Here is a example of what I get: { 'responseHeader'={ 'status'=0, 'QTime'=16, 'params'={ 'wt'='ruby', 'indent'='true', 'q'='*:*', 'facet'='true',

Re: Ranking search results by content type

2008-03-05 Thread Reece
You could have each doctype correspond to a number that's saved in the type field, and sort by the number and then score. Or you can do what I do and when you search, just weight each type differently. My types are all just one letter, so for instance: q=((search string) AND type:A^1) OR

Re: JSONRequestWriter

2008-03-05 Thread Doug Steigerwald
Looks like it's only happening when we use the LocalSolrQueryComponent from localsolr. rsp.add(response, sdoclist); sdoclist is a SolrDocumentList. Could that be causing an issue instead of it being just a DocList? Doug Yonik Seeley wrote: The output you showed is indeed incorrect, but I

Re: JSONRequestWriter

2008-03-05 Thread Yonik Seeley
I think the container is the issue (the type of rsp). Here is the Javadoc for SimpleOrderedMap: /** codeSimpleOrderedMap/code is a [EMAIL PROTECTED] NamedList} where access by key is more * important than maintaining order when it comes to representing the * held data in other forms, as

Re: Random search result

2008-03-05 Thread Yonik Seeley
There is a builtin fieldType to support random results. !-- The RandomSortField is not used to store or search any data. You can declare fields of this type it in your schema to generate psuedo-random orderings of your docs for sorting purposes. The ordering is

passing params into SOLR

2008-03-05 Thread Paul Treszczotko
Hi all, I'm using solrJ to build a wrapper for ColdFusion (scripting language such as PHP). What's the best practice for passing search parameters into solr from a web app? What are the shortcomings of each approach? Currently, I'm explicitly setting the params with

Re: boost ignored with wildcard queries

2008-03-05 Thread Chris Hostetter
: Using the StandardRequestHandler, it appears that the index boost values are : ignored when the query has a wildcard in it. For example, if I have 2 : doc's and one has a boost of 1.0 and another has a boost of 10.0, then I : do a search for bob*, both records will be returned with

Re: Unparseable date

2008-03-05 Thread Chris Hostetter
: According to the schema.xml-file The format for this date field is of the : form 1995-12-31T23:59:59Z. : : Yet I'm getting the following error on SOME queries: : : Mar 5, 2008 10:32:53 AM org.apache.solr.common.SolrException log : SEVERE: java.lang.RuntimeException: java.text.ParseException:

Re: Unparseable date

2008-03-05 Thread Daniel Andersson
It's stored in MySQL (datatype: datetime), then extracted and run through the following code: $date = substr($date, 0, 10) . T . substr($date, 11) . Z; If there was some odd chars at the end, I would have assumed it would have been included in the error message. SEVERE:

Re: Unparseable date

2008-03-05 Thread Chris Hostetter
: looking at the current code for DateField.toObject(Fieldable) it seems : inheriently broken, attempting to parse a string right after concating 'Z' : on the end even though the parser expects the Z to already be gone -- i'm : not sure how this could path could *ever* work, regardless of the

Re: Unparseable date

2008-03-05 Thread Daniel Andersson
On Mar 5, 2008, at 10:46 PM, Chris Hostetter wrote: : According to the schema.xml-file The format for this date field is of the : form 1995-12-31T23:59:59Z. : : Yet I'm getting the following error on SOME queries: : : Mar 5, 2008 10:32:53 AM org.apache.solr.common.SolrException log : SEVERE:

Re: Unparseable date

2008-03-05 Thread Daniel Andersson
On Mar 5, 2008, at 10:57 PM, Chris Hostetter wrote: : looking at the current code for DateField.toObject(Fieldable) it seems : inheriently broken, attempting to parse a string right after concating 'Z' : on the end even though the parser expects the Z to already be gone -- i'm : not sure

Re: Unparseable date

2008-03-05 Thread Chris Hostetter
: So if I add :00 to every time, it should be fine? : ie : 2008-02-12T15:02:06:00Z instead of 2008-02-12T15:02:06Z It's .000 not :00 ... 2008-02-12T15:02:06.000Z but like i said: that stack trace is odd, the time doesn't seem like it actually comes from any query params, it looks like it's

Re: Ranking search results by content type

2008-03-05 Thread Chris Hostetter
: Or you can do what I do and when you search, just weight each type : differently. My types are all just one letter, so for instance: : : q=((search string) AND type:A^1) OR ((search string) AND type:B^10) OR etc etc a simpler approach would be... q = +(search string) type:A^1 type:B^10

Re: passing params into SOLR

2008-03-05 Thread Ryan McKinley
Paul Treszczotko wrote: Hi all, I'm using solrJ to build a wrapper for ColdFusion (scripting language such as PHP). What's the best practice for passing search parameters into solr from a web app? What are the shortcomings of each approach? Currently, I'm explicitly setting the params with

Some problem with ShowFileRequestHandler

2008-03-05 Thread Edward Zhang
I want to programmatically retrieve the schema and the config from the ShowFileRequestHandler. I encounter some trouble. There are CJK characters in the xml files as follows: !-- Field to use to determine and enforce document uniqueness. Unless this field is marked with required=false,