You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Alejandro Delgadillo <ad...@febg.org> on 2011/06/08 00:06:54 UTC

Solr Coldfusion Search Issue

Hi,

I¹m having some troubles using Solr throught Coldfusion,  the problem right
now is that when I search for a term in a Custom field, the results
sometimes have the value that I sent to the custom field and not to the
field that contains the text, this is the cfsearch sintax that I¹m using:

<cfsearch collection="agenda,bitacoras"
criteria='""contents:#form.search#""AND""custom1:#form.tema#""AND""custom2:#
form.dia#""AND""custom4:#form.anio#""AND""custom3:#form.mon#""'
name="result" status="meta" startrow="#url.start#" maxrows="#max#"
contextpassages="5" contexthighlightbegin="____B____"
contexthighlightend="____BE____" suggestions="always">

Every custom fields gets the value by a combo box or drop box with a list of
option, the thing is that when the users sends a search for CUSTOM1,
sometimes the results include the same searched value un CONTENTS...

Do anyone have an idea on how to fix this?

I¹ll appreciate all the help I can get.

Regards.
Alex

Re: Solr Coldfusion Search Issue

Posted by Alejandro Delgadillo <ad...@febg.org>.
Thanks Lee for the quick response,

Let me explain it a little bit better

In the CFSEARCH tag, you use the CRITERIA attribute, what it does... By
default is that it sents to the SOLR via post the search query of the user
to the field where the text is stored in this case since I'm indexing PDF
files the variable CONTENTS in solr...

The problem is that also sends the custom field criteria to the contents
variables and that's why I have for example:

If I search the value "03" in CUSTOM1, it also search the same value in
CONTENTS, it works since the results are filtered by the value, but the
contents display the same value, in this case "03"

Maybe... I'm not sure... There is another way to search for custom fields
using the CFSEARCH tag, I've tried changing the order, but I still get the
same result...


On 6/7/11 4:14 PM, "lee carroll" <le...@googlemail.com> wrote:

> Can you see the query actually presented to solr in the logs ?
> 
> maybe capture that and then run it with a debug true in the admin pages.
> 
> sorry i cant help directly with your syntax
> 
> 
> On 7 June 2011 23:06, Alejandro Delgadillo <ad...@febg.org> wrote:
>> Hi,
>> 
>> I¹m having some troubles using Solr throught Coldfusion,  the problem right
>> now is that when I search for a term in a Custom field, the results
>> sometimes have the value that I sent to the custom field and not to the
>> field that contains the text, this is the cfsearch sintax that I¹m using:
>> 
>> <cfsearch collection="agenda,bitacoras"
>> criteria='""contents:#form.search#""AND""custom1:#form.tema#""AND""custom2:#
>> form.dia#""AND""custom4:#form.anio#""AND""custom3:#form.mon#""'
>> name="result" status="meta" startrow="#url.start#" maxrows="#max#"
>> contextpassages="5" contexthighlightbegin="____B____"
>> contexthighlightend="____BE____" suggestions="always">
>> 
>> Every custom fields gets the value by a combo box or drop box with a list of
>> option, the thing is that when the users sends a search for CUSTOM1,
>> sometimes the results include the same searched value un CONTENTS...
>> 
>> Do anyone have an idea on how to fix this?
>> 
>> I¹ll appreciate all the help I can get.
>> 
>> Regards.
>> Alex
>> 



Re: Solr Coldfusion Search Issue

Posted by lee carroll <le...@googlemail.com>.
Can you see the query actually presented to solr in the logs ?

maybe capture that and then run it with a debug true in the admin pages.

sorry i cant help directly with your syntax


On 7 June 2011 23:06, Alejandro Delgadillo <ad...@febg.org> wrote:
> Hi,
>
> I¹m having some troubles using Solr throught Coldfusion,  the problem right
> now is that when I search for a term in a Custom field, the results
> sometimes have the value that I sent to the custom field and not to the
> field that contains the text, this is the cfsearch sintax that I¹m using:
>
> <cfsearch collection="agenda,bitacoras"
> criteria='""contents:#form.search#""AND""custom1:#form.tema#""AND""custom2:#
> form.dia#""AND""custom4:#form.anio#""AND""custom3:#form.mon#""'
> name="result" status="meta" startrow="#url.start#" maxrows="#max#"
> contextpassages="5" contexthighlightbegin="____B____"
> contexthighlightend="____BE____" suggestions="always">
>
> Every custom fields gets the value by a combo box or drop box with a list of
> option, the thing is that when the users sends a search for CUSTOM1,
> sometimes the results include the same searched value un CONTENTS...
>
> Do anyone have an idea on how to fix this?
>
> I¹ll appreciate all the help I can get.
>
> Regards.
> Alex
>