RE: Unable to filter fq param on a dynamic field

2008-09-19 Thread Barry Harding
You were correct, I assumed that as I did not want to break the values in the 
fields into seperate tokens that I could just use string as the type in the 
schema for these fields.

As soon as I switched to a custom field type using

solr.KeywordTokenizerFactory and reindexed it all started working.





Thanks again for your help



Barry


From: Otis Gospodnetic [EMAIL PROTECTED]
Sent: 18 September 2008 20:40
To: solr-user@lucene.apache.org
Subject: Re: Unable to filter fq param on a dynamic field

Barry,

You are seeing the value of the field as it was saved (as the original), but 
perhaps something is funky with how it was analyzed/tokenized at search time 
and how it is being analyzed now at query time.  Double-check your 
fieldType/analysis settings for this field and make sure you are using the 
same/compatible analyzers at both index and query time.


Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



- Original Message 
 From: Barry Harding [EMAIL PROTECTED]
 To: solr-user@lucene.apache.org solr-user@lucene.apache.org
 Sent: Thursday, September 18, 2008 12:53:08 PM
 Subject: RE: Unable to filter fq param on a dynamic field

 Hi Otis,

 no that does not seem to bring back the correct results either in fact its 
 still
 zero results.

 Its also not bringing back results if I use the standard handler
 http://127.0.0.1:8080/apache-solr-1.3.0/select?q=Output-Type-facet:Monochrome

 but the field is visible in the documents returned if I search for the
 following:

 http://127.0.0.1:8080/apache-solr-1.3.0/IvolutionSearch?q=laser

 so i know that the field is in the results generated (shown below)


 -
 -
 name=responseHeader
   0
   666
 -
 name=params
   laser


 -
 name=response numFound=8056 start=0
 -
   $A
   Mono Laser Printers
   Printers|Mono Laser Printers
   Wired
   UK
   UK$AQ63360
   Q7697A#ABU
   Hewlett Packard
   HP
   Monochrome
   The LaserJet 9000 series printer is HP's fastest, most
 versatile LaserJet designed for today's distr
   1388.99
   Q63360
   HP LASERJET 9040 MONO LASER

   E000
   2
   Laser
   98404.jpg
   Workgroup printer
   MLASERPRN
   2008-09-18T16:44:01.029Z

 -
   $B
   Mono Laser Printers
   Printers|Mono Laser Printers
   Wired



 
 Misco is a division of Systemax Europe Ltd.  Registered in Scotland Number
 114143.  Registered Office: Caledonian Exchange, 19a Canning Street, Edinburgh
 EH3 8EG.  Telephone +44 (0)1933 686000.



Misco is a division of Systemax Europe Ltd.  Registered in Scotland Number 
114143.  Registered Office: Caledonian Exchange, 19a Canning Street, Edinburgh 
EH3 8EG.  Telephone +44 (0)1933 686000.

Re: Unable to filter fq param on a dynamic field

2008-09-18 Thread Otis Gospodnetic
Barry, does this return the correct hits:

http://127.0.0.1:8080/apache-solr-1.3.0/IvolutionSearch?q=Output-Type-facet:Monochrome

Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



- Original Message 
 From: Barry Harding [EMAIL PROTECTED]
 To: solr-user@lucene.apache.org solr-user@lucene.apache.org
 Sent: Thursday, September 18, 2008 7:21:49 AM
 Subject: Unable to filter fq param on a dynamic field
 
 
 
 Hi,
 
 I have a fairly simple solr setup with several predefined fields that are 
 indexed and stored and also depending on the type of product I also add 
 various 
 dynamic fields of type string to a record, and I should mention that I am 
 using 
 the
 solr.DisMaxRequestHandler request handler called /IvolutionSearch in my 
 example requests.
 
 
 
 My Schema is as follows:
 
 
 required=true /
 
 
 required=true /
 
 
 required=true /
 
 
 required=true /
 
 
 
 
 required=true /
 
 
 /
 
 
 required=true /
 
 
 /
 
 
 
 
 required=true /
 
 
 required=false /
 
 
 required=false /
 
 
 required=true /
 
 
 required=false /
 
 
 required=true /
 
 
 
 
 multiValued=false /
 
 
 
 Now I can query for any of the fixed field types Such as ProductName or 
 ReviewRating and get the results I expect but when I try to run a filter 
 query 
 on the dynamic fields in the result, I always end up with no results being 
 returned.
 
 
 
 So if I run the following query against my copy of solr 1.3 I get the results 
 I 
 am expecting
 
 
 
 http://127.0.0.1:8080/apache-solr-1.3.0/IvolutionSearch?q=laserrows=100
 
 
 
 - 
 - 
   $A
   Mono Laser Printers
   Printers|Mono Laser Printers
   Wired
   UK
   UK$AQ969719
   3500V_DN
   Xerox
   Xerox
   Monochrome
   The Xerox Phaser 3500 series printer provides an 
 affordable solution to meet the increasing volume a
   464.10
   Q969719
   XEROX 3500DN MONO LASER
   
   E000
   2
   Laser
   26099.jpg
   Workgroup printer
   MLASERPRN
   2008-09-17T17:10:44.37Z
   
 - 
   $B
   Mono Laser Printers
   Printers|Mono Laser Printers
   Wired
 
 and so on for the 100 results
 
 no if I try to filter those results to just those that contain 
 Output-Type-facet equaling Monochrome
 
 using :
 http://127.0.0.1:8080/apache-solr-1.3.0/IvolutionSearch?q=laserrows=100fq=Output-Type-facet:Monochrome
 or
 
 http://127.0.0.1:8080/apache-solr-1.3.0/IvolutionSearch?q=laserrows=100fq=Output-Type-facet:Monochrome;
 or
 http://127.0.0.1:8080/apache-solr-1.3.0/IvolutionSearch?q=laserrows=100fq=Output-Type-facet:Monochrome;
 or
 http://127.0.0.1:8080/apache-solr-1.3.0/IvolutionSearch?q=laserrows=100fq=Output-Type-facet:Monochrome;
 
 
 
 I just get zero results back even though I know that filed contains that 
 value, 
 please before I pull my hair out tell me what mistake I have made, why can I 
 query using a static field and not a dynamic field
 
 any help even if its to say I have been stupid or to tell me to reread a 
 section 
 of the manual/Wiki because I did not get the point much appreciated.
 
 
 
 Thanks
 
 Barry H
 
 
 
 
 
 
 
 
 
 
 Misco is a division of Systemax Europe Ltd.  Registered in Scotland Number 
 114143.  Registered Office: Caledonian Exchange, 19a Canning Street, 
 Edinburgh 
 EH3 8EG.  Telephone +44 (0)1933 686000.



RE: Unable to filter fq param on a dynamic field

2008-09-18 Thread Barry Harding
Hi Otis,

no that does not seem to bring back the correct results either in fact its 
still zero results.

Its also not bringing back results if I use the standard handler
 http://127.0.0.1:8080/apache-solr-1.3.0/select?q=Output-Type-facet:Monochrome

but the field is visible in the documents returned if I search for the 
following:

http://127.0.0.1:8080/apache-solr-1.3.0/IvolutionSearch?q=laser

so i know that the field is in the results generated (shown below)

 ?xml version=1.0 encoding=UTF-8 ?
-http://127.0.0.1:8080/apache-solr-1.3.0/IvolutionSearch?q=laser# response
-http://127.0.0.1:8080/apache-solr-1.3.0/IvolutionSearch?q=laser# lst 
name=responseHeader
  int name=status0/int
  int name=QTime666/int
-http://127.0.0.1:8080/apache-solr-1.3.0/IvolutionSearch?q=laser# lst 
name=params
  str name=qlaser/str
  /lst
  /lst
-http://127.0.0.1:8080/apache-solr-1.3.0/IvolutionSearch?q=laser# result 
name=response numFound=8056 start=0
-http://127.0.0.1:8080/apache-solr-1.3.0/IvolutionSearch?q=laser# doc
  str name=CampaignCode$A/str
  str name=CategoryNameMono Laser Printers/str
  str name=CategoryPathPrinters|Mono Laser Printers/str
  str name=Connectivity-Technology-facetWired/str
  str name=CountryCodeUK/str
  str name=IdUK$AQ63360/str
  str name=MPNQ7697A#ABU/str
  str name=Manufacturer-facetHewlett Packard/str
  str name=ManufacturerNameHP/str
  str name=Output-Type-facetMonochrome/str
  str name=OverviewThe LaserJet 9000 series printer is HP's fastest, most 
versatile LaserJet designed for today's distr/str
  float name=Price1388.99/float
  str name=ProductCodeQ63360/str
  str name=ProductNameHP LASERJET 9040 MONO LASER/str
  int name=ReviewRating /
  str name=StockCodeE000/str
  str name=TaxCode2/str
  str name=Technology-facetLaser/str
  str name=ThumbnailURI98404.jpg/str
  str name=Type-facetWorkgroup printer/str
  str name=WebClassificationMLASERPRN/str
  date name=timestamp2008-09-18T16:44:01.029Z/date
  /doc
-http://127.0.0.1:8080/apache-solr-1.3.0/IvolutionSearch?q=laser# doc
  str name=CampaignCode$B/str
  str name=CategoryNameMono Laser Printers/str
  str name=CategoryPathPrinters|Mono Laser Printers/str
  str name=Connectivity-Technology-facetWired/str




Misco is a division of Systemax Europe Ltd.  Registered in Scotland Number 
114143.  Registered Office: Caledonian Exchange, 19a Canning Street, Edinburgh 
EH3 8EG.  Telephone +44 (0)1933 686000.

Re: Unable to filter fq param on a dynamic field

2008-09-18 Thread Otis Gospodnetic
Barry,

You are seeing the value of the field as it was saved (as the original), but 
perhaps something is funky with how it was analyzed/tokenized at search time 
and how it is being analyzed now at query time.  Double-check your 
fieldType/analysis settings for this field and make sure you are using the 
same/compatible analyzers at both index and query time.


Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



- Original Message 
 From: Barry Harding [EMAIL PROTECTED]
 To: solr-user@lucene.apache.org solr-user@lucene.apache.org
 Sent: Thursday, September 18, 2008 12:53:08 PM
 Subject: RE: Unable to filter fq param on a dynamic field
 
 Hi Otis,
 
 no that does not seem to bring back the correct results either in fact its 
 still 
 zero results.
 
 Its also not bringing back results if I use the standard handler
 http://127.0.0.1:8080/apache-solr-1.3.0/select?q=Output-Type-facet:Monochrome
 
 but the field is visible in the documents returned if I search for the 
 following:
 
 http://127.0.0.1:8080/apache-solr-1.3.0/IvolutionSearch?q=laser
 
 so i know that the field is in the results generated (shown below)
 
 
 -
 -
 name=responseHeader
   0
   666
 -
 name=params
   laser
   
   
 -
 name=response numFound=8056 start=0
 -
   $A
   Mono Laser Printers
   Printers|Mono Laser Printers
   Wired
   UK
   UK$AQ63360
   Q7697A#ABU
   Hewlett Packard
   HP
   Monochrome
   The LaserJet 9000 series printer is HP's fastest, most 
 versatile LaserJet designed for today's distr
   1388.99
   Q63360
   HP LASERJET 9040 MONO LASER
   
   E000
   2
   Laser
   98404.jpg
   Workgroup printer
   MLASERPRN
   2008-09-18T16:44:01.029Z
   
 -
   $B
   Mono Laser Printers
   Printers|Mono Laser Printers
   Wired
 
 
 
 
 Misco is a division of Systemax Europe Ltd.  Registered in Scotland Number 
 114143.  Registered Office: Caledonian Exchange, 19a Canning Street, 
 Edinburgh 
 EH3 8EG.  Telephone +44 (0)1933 686000.