-ignore words not working?
Hi, I'm trying to work out why this query won't work: ((title:"man")) OR ((keywords:"man")) OR ((description:"man")) AND (has_gif:"1") AND (category_name:"Clip Art") AND ((-title:"men") AND (-keywords:"men") AND (-description:"men")) If I remove the last bit, so we have: ((title:"man")) OR ((keywords:"man")) OR ((description:"man")) AND (has_gif:"1") AND (category_name:"Clip Art") ...and it works fine As soon as I put in -field:"value" it yeilds no results... even though there are a ton of results that match the criteria :/ Can anyone suggest what I'm doing wrong? Everything else is working perfectly... would be a shame if I couldn't get this feature working -- Andy Newby a...@ultranerds.com
Possible to sort in .xml file?
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 -- Andy Newby a...@ultranerds.com
Re: Possible to sort in .xml file?
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 wrote: > > : 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
Synoms not working quite right?
Hi, I'm trying to get the synoms working for my search system, but they don't seem to be working: television,televisions,tv,tvs,tvisions,abcdef computer => laptop I restarted Solr, and then tried a search for "tvisions", but no results (as there is obivously no result with that keyword in, BUT there are a ton with "tv" , "television" etc in) However, the query: computer => laptop ..works fine ( search for "computer", and I also get results matching "laptop") TIA -- Andy Newby a...@ultranerds.com
Possible - giving higher score based on "views"
Hi, First let me explain the logic behind here :) We have a list of "images" in a mySQL DB, which we are indexing (fine) We have the following fields: 1) description - a text field, separated by whitespace 2) keywords - a text field, separated by whitespace 3) download_count (a "sint", i.e sortable int) What we are doing currently is: (keywords:"st" AND keywords:"patricks") OR (description:"st" AND description:"patricks") ...and then doing the "sort" with: score desc, download_count desc The results work ok, but ideally we would like to give higher priority for those links that match the query, and then have a higher "download_count" value For example, we have say 2 records: Keywords: st patricks some other keywords here Description: st irish holiday View Count: 54343 Keywords: st patricks some other keywords here Description: st patricks irish holiday View Count: 543 The 2nd record would currently show up higher for me, due to the fact we have "st patricks" in both the "keywords" and "description" fields... but what we ideally want, is for the "view count" to actually increase the ranking a bit more, to hopefully bring the results higher up We've tried doing stuff like: sort=download_count ..but that doesn't do what we need (it simply sorts by the number of downloads, instead of giving a higher ranking based on the number of views) I've had a look on google regarding this, but can't seem to find anything like the above. Any ideas/advice are much appreciated :) TIA -- Andy Newby a...@ultranerds.com
Results driving me nuts!
Hi, Ok, I'm really really trying to get my head around this, but I just can't :/ Here are 2 example records, both using the query "st patricks" to search on (matches for the keywords are in **stars** like so, to make a point of what SHOULD be matching); keywords: animations mini alphabets **st** **patricks** animated 1 clover animations mini alphabets **st** **patricks** description: animated 1 clover "124966":" 209.23984 = (MATCH) product of: 418.47968 = (MATCH) sum of: 418.47968 = (MATCH) sum of: 212.91336 = (MATCH) weight(keywords:st in 5697), product of: 0.41379675 = queryWeight(keywords:st), product of: 7.5798326 = idf(docFreq=233, maxDocs=168578) 0.05459181 = queryNorm 514.5361 = (MATCH) fieldWeight(keywords:st in 5697), product of: 1.4142135 = tf(termFreq(keywords:st)=2) 7.5798326 = idf(docFreq=233, maxDocs=168578) 48.0 = fieldNorm(field=keywords, doc=5697) 205.56633 = (MATCH) weight(keywords:patricks in 5697), product of: 0.4065946 = queryWeight(keywords:patricks), product of: 7.447905 = idf(docFreq=266, maxDocs=168578) 0.05459181 = queryNorm 505.58057 = (MATCH) fieldWeight(keywords:patricks in 5697), product of: 1.4142135 = tf(termFreq(keywords:patricks)=2) 7.447905 = idf(docFreq=266, maxDocs=168578) 48.0 = fieldNorm(field=keywords, doc=5697) 0.5 = coord(1/2) The other one: desc: a black and white mug of beer with a three leaf clover in it keywords: saint **patricks** day green irish beer spel132_bw clip art holidays **st** **patricks** day handle drink celebrate clip art holidays **st** **patricks** day 5 matches "145351":" 193.61652 = (MATCH) product of: 387.23303 = (MATCH) sum of: 387.23303 = (MATCH) sum of: 177.4278 = (MATCH) weight(keywords:st in 25380), product of: 0.41379675 = queryWeight(keywords:st), product of: 7.5798326 = idf(docFreq=233, maxDocs=168578) 0.05459181 = queryNorm 428.78006 = (MATCH) fieldWeight(keywords:st in 25380), product of: 1.4142135 = tf(termFreq(keywords:st)=2) 7.5798326 = idf(docFreq=233, maxDocs=168578) 40.0 = fieldNorm(field=keywords, doc=25380) 209.80525 = (MATCH) weight(keywords:patricks in 25380), product of: 0.4065946 = queryWeight(keywords:patricks), product of: 7.447905 = idf(docFreq=266, maxDocs=168578) 0.05459181 = queryNorm 516.006 = (MATCH) fieldWeight(keywords:patricks in 25380), product of: 1.7320508 = tf(termFreq(keywords:patricks)=3) 7.447905 = idf(docFreq=266, maxDocs=168578) 40.0 = fieldNorm(field=keywords, doc=25380) 0.5 = coord(1/2) Now the thing thats getting me, is the record which has 5 occurencs of "st patricks" , is so different in terms of the scores it gives! 209.23984 193.61652 (these should be the other way around) Can anyone try and explain whats going on with this? BTW, the queries are matched based on a normal "white space" index, nothing special. The actual query being used, is as follows: (keywords:"st" AND keywords:"patricks") OR (description:"st" AND description:"patricks") TIA - I'm hoping someone can save my sanity ;) Cheers -- Andy Newby a...@ultranerds.com
Cant get Synonym working
Hi, I'm coing back to trying to get the Synonynms working (alongside the spellchecker). Here is what I have: Then in synonyms.txt, I have: pixima => pixma cellpne => cellphone computer => laptop , car, food, aaa, food However, after restarting Solr and then trying a search for "aaa" , my test result which contains "food" in, never seems to come up Anyone got any ideas? The annoying thing is that it works fine on a 2nd "dev" install I have (much simpler, and not using multicore), but using the exact same fieldType setup. Can anyone shed any light? TIA! -- Andy Newby a...@ultranerds.com
Can't get synonyms working
Hi, I'm trying to work out why Synonyms won't work for my installation of Solr. Its a basic install (just using the "example" set, and have tweaked the fields to what I need). The files are all in: (schema.xml, synonyms.txt etc), but for some reason its not working: /var/home/site/solr/example/solr/conf For the text_ws field I have this set: ...and for the related fields I'm trying to search with the synonym file: In my synonynm file I have this example: car => mascot mascot => car ..and in Solr I actually have a result with the "description" of "bird hawk mascot 002 (u65bsag)" ...surely my setup should be showing that result? I've been doing my head in over this - so any advice would be much appreciated :) TIA! -- Andy Newby