if exists in an fq

2017-09-13 Thread Peter Kirk
Hi I want to formulate an fq which filters on fields depending on what fields exist in each document. For example: if the document has a "field1" then use "field1:[1 TO 100]"; but if there is no "field1", then check if there is a "field2"; if there is a "field2" then use "field2:[1 TO 100]; but

generate field name in query

2017-08-02 Thread Peter Kirk
Hi - is it possible to create a query (or fq) which generates the field to search on, based on whether or not the document has that field? Eg. Search for documents with prices in the range 100 - 200, using either the field "price_owner_float" or "price_customer_float" (if a document has a field

Find duplicates

2014-12-02 Thread Peter Kirk
Hi Is it possible to formulate a Solr query which finds all documents which have the same value in a particular field? Note, I don't know what the value is, I just want to find all documents with duplicate values. For example, I have 5 documents: Doc1: field Name = Peter Doc2: field Name = Jac

solr-user@lucene.apache.org

2014-04-08 Thread Peter Kirk
he non alpha-num characters you'd likely get less brittle results. You know your problem domain better than I do though, so whatever makes most sense. Best, Erick On Tue, Apr 8, 2014 at 6:55 AM, Ahmet Arslan wrote: > Hi Peter, > > TermQueryParser is useful in your case. > q={

solr-user@lucene.apache.org

2014-04-08 Thread Peter Kirk
Hi How to search for Solr special characters like '(' and '&'? I am trying to execute searches for "products" in my Solr (3.6.1) index, based on the "categories" to which these products belong. The categories are stored in a multistring field for the products, and are hierarchical, and are fed

SV: fq with { or } in Solr 4.3.1

2013-10-23 Thread Peter Kirk
ash or enclose the entire term in quotes: catid:\{123\} catid:"{123}" -- Jack Krupansky -----Original Message- From: Peter Kirk Sent: Wednesday, October 23, 2013 4:57 AM To: solr-user@lucene.apache.org Subject: RE: fq with { or } in Solr 4.3.1 Sorry, that was just a typo. / s

RE: fq with { or } in Solr 4.3.1

2013-10-23 Thread Peter Kirk
ber 2013 10:52 To: solr-user@lucene.apache.org Subject: Re: fq with { or } in Solr 4.3.1 Missing a colon before the curly bracket in the fq? On Wed, Oct 23, 2013, at 09:42 AM, Peter Kirk wrote: > Hi > > If I do a search like > /search?q=catid:{123} > > I get the results I expe

fq with { or } in Solr 4.3.1

2013-10-23 Thread Peter Kirk
Hi If I do a search like /search?q=catid:{123} I get the results I expect. But if I do /search?q=*:*&fq=catid{123} I get an error from Solr like: org.apache.solr.search.SyntaxError: Cannot parse 'catid:{123}': Encountered " "}" "} "" at line 1, column 58. Was expecting one of: "TO" ... ...

RE: SolrParams to and from NamedList

2013-09-24 Thread Peter Kirk
Hi - I think there is a bug in the conversion methods for SolrParams. But it seems that using ModifiableSolrParams (to add and remove parameters and values, which is what I want to do), is the way to go. /Peter -Original Message- From: Peter Kirk [mailto:p...@alpha-solutions.dk] Sent

SolrParams to and from NamedList

2013-09-23 Thread Peter Kirk
Hi, In a request-handler, if I run the below code, I get an exception from Solr undefined field: "[Ljava.lang.String;@41061b68" It appears the conversion between SolrParams and NamedList and back again fails if one of the parameters is an array. This could be a couple of configuration parameter

RE: Help with synonyms

2013-06-25 Thread Peter Kirk
dex-time analyzers need to be "compatible", which sometimes means that they can't be identical - since replacement rules mean that a term will not appear in the index. -- Jack Krupansky -Original Message- From: Peter Kirk Sent: Monday, June 24, 2013 4:10 AM To: solr-user@luc

Help with synonyms

2013-06-24 Thread Peter Kirk
Hi I have a synonyms file that looks like this: finagle => æggeblomme frumpy => spiste canard, æggeblomme corpse, spiste (It's just an example, and has no real meaning). The issue I don't understand is that a search for "finagle" does not find documents containing "æggeblomme" (which means "eg

action=CREATE

2013-05-06 Thread Peter Kirk
Hi I have a core definition in solr.xml which looks like the following: If I instead want to create this core with a CREATE command, how do I also supply a property - like "language" in the above? For example, some sort of request: http://localhost:8080/solr/admin/cores?acti

SV: Solr 4 reload failed core

2013-05-03 Thread Peter Kirk
#x27;s already an index. Best Erick On Fri, May 3, 2013 at 6:27 AM, Peter Kirk wrote: > Hi > > I have a multi-core installation, with 2 cores. Sometimes, when Solr starts > up, one of the cores fails (due to an extension to Solr I have, which is > waiting on an external serv

Solr 4 reload failed core

2013-05-03 Thread Peter Kirk
Hi I have a multi-core installation, with 2 cores. Sometimes, when Solr starts up, one of the cores fails (due to an extension to Solr I have, which is waiting on an external service which has yet to initialise). In previous versions of Solr, I could subsequently issue a RELOAD to this core, e

RessourceLoader newInstance

2013-03-08 Thread Peter Kirk
Hi Can someone explain to me the point of the method "public T newInstance(String cname, Class expectedType)" in interface org.apache.solr.common.ResourceLoader (or org.apache.lucene.analysis.util.ResourceLoader)? If I want to implement a ResourceLoader, what is the purpose of me implementing

RE: Multivalued or not

2012-11-14 Thread Peter Kirk
roduced to drive QueryParser behavior when a single string produces multiple tokens. Defaults to off for version >= 1.4 1.5: omitNorms defaults to true for primitive field types (int, float, boolean, string...) - Jeeva Blog: http://www.myjeeva.com On Nov 14, 2012, at 2:54 PM, Peter Kirk wro

RE: Multivalued or not

2012-11-14 Thread Peter Kirk
Should be 1.1 I see. -Original Message- From: Peter Kirk [mailto:p...@alpha-solutions.dk] Sent: 14. november 2012 10:24 To: solr-user@lucene.apache.org Subject: RE: Multivalued or not Hi, it says version 1.0 /Peter -Original Message- From: Erik Hatcher [mailto:erik.hatc

RE: Multivalued or not

2012-11-14 Thread Peter Kirk
, Peter Kirk wrote: > Hi > > Thanks for the reply. It is strange, because when I index to a field defined > like: > > name="*_string" > stored="true" > type="string" /> >

RE: Multivalued or not

2012-11-14 Thread Peter Kirk
multiValued attribute value is false by default (, , ) -Jeeva Blog: http://www.myjeeva.com On Nov 14, 2012, at 2:04 PM, Peter Kirk wrote: > Hi > > In Solr 3.6, is multivalued for fields, default true or false? > > It appears that it is default false for normal fields, and d

Multivalued or not

2012-11-14 Thread Peter Kirk
Hi In Solr 3.6, is multivalued for fields, default true or false? It appears that it is default false for normal fields, and default true for dynamic fields - is that correct? Thanks, Peter

RE: Group.query

2012-09-26 Thread Peter Kirk
ember of group1 and group2, just add both for the product document so that each product has an array of group. Then you can easily get all products for group1 by doing query: group:group1 Regards, Ingar On Wed, Sep 26, 2012 at 10:48 AM, Peter Kirk wrote: > Thanks. Yes, the only solution I

RE: Group.query

2012-09-26 Thread Peter Kirk
12:26 PM, Peter Kirk wrote: > Hi > > I have "products" which belong to one or more "groups". > Products are documents in Solr, while the groups are fields (eg. > group_1_bool:true). > > For example: > > Prod1 => group1, group2 > Prod2 =>

Group.query

2012-09-25 Thread Peter Kirk
Hi I have "products" which belong to one or more "groups". Products are documents in Solr, while the groups are fields (eg. group_1_bool:true). For example: Prod1 => group1, group2 Prod2 => group1, group2 Prod3 => group1 Prod4 => group2 I would like to execute a query which results in the grou

Join in Solr 3.6

2012-09-25 Thread Peter Kirk
Hi. I have read there is "join" functionality in Solr 4 beta. Is there a "join" in Solr 3.6? Thanks, Peter

Grouping

2012-09-21 Thread Peter Kirk
Hi It appears from the Solr documentation that it is not possible to group by multi-value fields. Is this correct? Also, grouping only works on text fields - not for example int fields. I was wondering what the basis for this decision was, and if it is actually possible to group by an int fiel

terms component search

2012-09-06 Thread Peter Kirk
Hi I am trying to implement some "auto suggest" functionality, and am currently looking at the terms component (Solr 3.6). For example, I can form a query like this: http://solrhost/solr/mycore/terms?terms.fl=title_s&terms.sort=index&terms.limit=5&terms.prefix=Hotel+C which searches in the "ti

Unmatched quotes

2012-08-24 Thread Peter Kirk
Hi, If I execute the following query, with unmatched quotes, I get an error from Solr - as I haven't escaped the middle ". But the error message appears to simply be "400 null". Is it possible to get Solr to return a more informative error message? http://myhost/solr/myapp/select?q=title:"cycl

RE: Sort on dynamic field

2012-08-17 Thread Peter Kirk
On Thu, Aug 16, 2012 at 8:00 AM, Peter Kirk wrote: >> Hi, a question about sorting and dynamic fields in "Solr Specification >> Version: 3.6.0.2012.04.06.11.34.07". >> >> I have a field defined like >> > multiValued="false"/> >> >

Sort on dynamic field

2012-08-16 Thread Peter Kirk
Hi, a question about sorting and dynamic fields in "Solr Specification Version: 3.6.0.2012.04.06.11.34.07". I have a field defined like Where type int is If I perform a search, which returns 13 documents, and sort by a field called "item_group_int", then it almost produces the results I expe

RE: simple query help

2012-05-15 Thread Peter Kirk
Hi If I understand the terms correctly, the search-handler was configured to use "edismax". The start of the configuration in the solrconfig.xml looks like this: edismax In any case, when I commented-out the "deftype" entry, and restarted the solr webapp, things began to function

RE: simple query help

2012-05-15 Thread Peter Kirk
er@lucene.apache.org Subject: Re: simple query help Hi, You should use parantheses, have you tried that? q=(skcode:2021051 and flength:368.0) or (skcode:2021049 and ent_no:1040970907) http://robotlibrarian.billdueber.com/solr-and-boolean-operators/ Bye, Andras 2012/5/15 Peter Kirk > Hi >

simple query help

2012-05-15 Thread Peter Kirk
Hi Can someone please give me some help with a simple query. If I search q=skcode:2021051 and flength:368.0 I get 1 document returned (doc A) If I search q=skcode:2021049 and ent_no:1040970907 I get 1 document returned (doc B) But if I search q=skcode:2021051 and flength:368.0 or skcode:2021