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 deniz <de...@gmail.com> on 2011/06/02 08:28:18 UTC

synonyms problem

Hi all,

here is a piece from my solfconfig:   

 <fieldType name="string" class="solr.StrField" sortMissingLast="true"
omitNorms="true">
    <analyzer type="query">
            <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
  </analyzer>
    </fieldType>


but somehow synonyms are not read... I mean there is no match when i use a
word in the synonym file... any ideas?

-----
Zeki ama calismiyor... Calissa yapar...
--
View this message in context: http://lucene.472066.n3.nabble.com/synonyms-problem-tp3014006p3014006.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: synonyms problem

Posted by Erick Erickson <er...@gmail.com>.
Please take a look at the analysis page for the field in question. I don't
even know what happens if you define ONLY a query analyzer (or you left
things out as an efficiency).

Substituting synonyms to a string field is suspicious, I assume you're only
indexing single tokens in that field.

You have to re-index after the query time change to see the effects.

Best
Erick

On Mon, Jun 6, 2011 at 8:33 PM, deniz <de...@gmail.com> wrote:
> well i was trying to say that; i have changed the config files for synonyms
> and so on but nothing happens so i thought i needed to do something in java
> code too... i was trying to ask about that...
>
> -----
> Zeki ama calismiyor... Calissa yapar...
> --
> View this message in context: http://lucene.472066.n3.nabble.com/synonyms-problem-tp3014006p3032666.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: synonyms problem

Posted by deniz <de...@gmail.com>.
well i was trying to say that; i have changed the config files for synonyms
and so on but nothing happens so i thought i needed to do something in java
code too... i was trying to ask about that...

-----
Zeki ama calismiyor... Calissa yapar...
--
View this message in context: http://lucene.472066.n3.nabble.com/synonyms-problem-tp3014006p3032666.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: synonyms problem

Posted by Erick Erickson <er...@gmail.com>.
What does "call synonym methods in Java" mean? That is, what are
you trying to accomplish and from where?

Best
Erick

On Sun, Jun 5, 2011 at 9:48 PM, deniz <de...@gmail.com> wrote:
> well i have changed it into text... but still confused about how to use
> synonyms...
>
> and also I want to know how to call synonym methods in java... i have tried
> to use synonymmap and some other similar things but nothing happens...
> anyone can give me a sample or a website that i can find examples about solr
> in java?
>
> -----
> Zeki ama calismiyor... Calissa yapar...
> --
> View this message in context: http://lucene.472066.n3.nabble.com/synonyms-problem-tp3014006p3028353.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: synonyms problem

Posted by deniz <de...@gmail.com>.
well i have changed it into text... but still confused about how to use
synonyms... 

and also I want to know how to call synonym methods in java... i have tried
to use synonymmap and some other similar things but nothing happens...
anyone can give me a sample or a website that i can find examples about solr
in java?

-----
Zeki ama calismiyor... Calissa yapar...
--
View this message in context: http://lucene.472066.n3.nabble.com/synonyms-problem-tp3014006p3028353.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: synonyms problem

Posted by deniz <de...@gmail.com>.
oh thank you for reminding me about string and text issues... I will change
it asap... and about index analyzer i just removed if for brevity... 

i will try again and if it fails will post here again...

thank you so much

-----
Zeki ama calismiyor... Calissa yapar...
--
View this message in context: http://lucene.472066.n3.nabble.com/synonyms-problem-tp3014006p3018185.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: synonyms problem

Posted by François Schiettecatte <fs...@gmail.com>.
Are you sure solr.StrField is the way to go with this? solr.StrField stores the entire text verbatim and I am pretty sure skips any analysis. Perhaps you should use solr.TextField instead.

François

On Jun 2, 2011, at 2:28 AM, deniz wrote:

> Hi all,
> 
> here is a piece from my solfconfig:   
> 
> <fieldType name="string" class="solr.StrField" sortMissingLast="true"
> omitNorms="true">
>    <analyzer type="query">
>            <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
> ignoreCase="true" expand="true"/>
>  </analyzer>
>    </fieldType>
> 
> 
> but somehow synonyms are not read... I mean there is no match when i use a
> word in the synonym file... any ideas?
> 
> -----
> Zeki ama calismiyor... Calissa yapar...
> --
> View this message in context: http://lucene.472066.n3.nabble.com/synonyms-problem-tp3014006p3014006.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: synonyms problem

Posted by lee carroll <le...@googlemail.com>.
oh and its a string field change this to be text if you need analysis

class="solr.StrField"

lee c

On 2 June 2011 11:45, lee carroll <le...@googlemail.com> wrote:
> Deniz,
>
> it looks like you are missing an index anlayzer ? or have you removed
> that for brevity ?
>
> lee c
>
> On 2 June 2011 10:41, Gora Mohanty <go...@mimirtech.com> wrote:
>> On Thu, Jun 2, 2011 at 11:58 AM, deniz <de...@gmail.com> wrote:
>>> Hi all,
>>>
>>> here is a piece from my solfconfig:
>> [...]
>>> but somehow synonyms are not read... I mean there is no match when i use a
>>> word in the synonym file... any ideas?
>> [...]
>>
>> Please provide further details, e.g., is your field in schema.xml using
>> this fieldType, one example line from the synonyms.txt file, how are
>> you searching, what results you expect to get, and what are the actual
>> results.
>>
>> Also, while this is not the issue here, normally the fieldType
>> "string" is a non-analyzed field, and one would normally use
>> a different fieldType, e.g., "text" for data that are to be analyzed.
>>
>> Regards,
>> Gora
>>
>

Re: synonyms problem

Posted by lee carroll <le...@googlemail.com>.
Deniz,

it looks like you are missing an index anlayzer ? or have you removed
that for brevity ?

lee c

On 2 June 2011 10:41, Gora Mohanty <go...@mimirtech.com> wrote:
> On Thu, Jun 2, 2011 at 11:58 AM, deniz <de...@gmail.com> wrote:
>> Hi all,
>>
>> here is a piece from my solfconfig:
> [...]
>> but somehow synonyms are not read... I mean there is no match when i use a
>> word in the synonym file... any ideas?
> [...]
>
> Please provide further details, e.g., is your field in schema.xml using
> this fieldType, one example line from the synonyms.txt file, how are
> you searching, what results you expect to get, and what are the actual
> results.
>
> Also, while this is not the issue here, normally the fieldType
> "string" is a non-analyzed field, and one would normally use
> a different fieldType, e.g., "text" for data that are to be analyzed.
>
> Regards,
> Gora
>

Re: synonyms problem

Posted by Gora Mohanty <go...@mimirtech.com>.
On Thu, Jun 2, 2011 at 11:58 AM, deniz <de...@gmail.com> wrote:
> Hi all,
>
> here is a piece from my solfconfig:
[...]
> but somehow synonyms are not read... I mean there is no match when i use a
> word in the synonym file... any ideas?
[...]

Please provide further details, e.g., is your field in schema.xml using
this fieldType, one example line from the synonyms.txt file, how are
you searching, what results you expect to get, and what are the actual
results.

Also, while this is not the issue here, normally the fieldType
"string" is a non-analyzed field, and one would normally use
a different fieldType, e.g., "text" for data that are to be analyzed.

Regards,
Gora