An example for creating SynonymMap Object?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

An example for creating SynonymMap Object?

baris.kazar
Hi,-

  is there any example on Lucene domain for creating SynonymMap Object?

Best regards


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: An example for creating SynonymMap Object?

Markus Jelsma-2
Hello Baris,

Check out the filter factory and the map parser for a more low level example:

https://github.com/apache/lucene-solr/blob/master/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymGraphFilterFactory.java
https://github.com/apache/lucene-solr/blob/master/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymMap.java

 
 
-----Original message-----

> From:[hidden email] <[hidden email]>
> Sent: Monday 15th October 2018 20:52
> To: [hidden email]
> Subject: An example for creating SynonymMap Object?
>
> Hi,-
>
>   is there any example on Lucene domain for creating SynonymMap Object?
>
> Best regards
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: An example for creating SynonymMap Object?

baris.kazar
Thanks Markus.

i am trying to see whether i need to add abc-> 123 and also 123-> abc
via builder.add.

Best regards



On 10/15/18 3:28 PM, Markus Jelsma wrote:

> Hello Baris,
>
> Check out the filter factory and the map parser for a more low level example:
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache_lucene-2Dsolr_blob_master_lucene_analysis_common_src_java_org_apache_lucene_analysis_synonym_SynonymGraphFilterFactory.java&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=nlG5z5NcNdIbQAiX-BKNeyLlULCbaezrgocEvPhQkl4&m=WfZ3QMUdvaRJKSSAOkVSI2ud96gdsfnb6_5W_s66ADc&s=gjKepGZ0VZN-2J6s7QgQZs7xeg5qbDwZ8a5soocXnhs&e=
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache_lucene-2Dsolr_blob_master_lucene_analysis_common_src_java_org_apache_lucene_analysis_synonym_SynonymMap.java&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=nlG5z5NcNdIbQAiX-BKNeyLlULCbaezrgocEvPhQkl4&m=WfZ3QMUdvaRJKSSAOkVSI2ud96gdsfnb6_5W_s66ADc&s=ZFSdd4OtF4v3cg7Y5dQV81y82Xt9XvLv-FDYwDbviKo&e=
>
>  
>  
> -----Original message-----
>> From:[hidden email] <[hidden email]>
>> Sent: Monday 15th October 2018 20:52
>> To: [hidden email]
>> Subject: An example for creating SynonymMap Object?
>>
>> Hi,-
>>
>>    is there any example on Lucene domain for creating SynonymMap Object?
>>
>> Best regards
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: An example for creating SynonymMap Object?

Markus Jelsma-2
In reply to this post by baris.kazar
Hello Baris,

The expand parameter defaults to true, so you should not have to add both rules. If you are using Solr, you can easily check it in the analysis tab. If not, printing the resulting Query object works as well.

Regards,
Markus

 
 
-----Original message-----

> From:[hidden email] <[hidden email]>
> Sent: Monday 15th October 2018 23:03
> To: [hidden email]
> Subject: Re: An example for creating SynonymMap Object?
>
> Thanks Markus.
>
> i am trying to see whether i need to add abc-> 123 and also 123-> abc
> via builder.add.
>
> Best regards
>
>
>
> On 10/15/18 3:28 PM, Markus Jelsma wrote:
> > Hello Baris,
> >
> > Check out the filter factory and the map parser for a more low level example:
> >
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache_lucene-2Dsolr_blob_master_lucene_analysis_common_src_java_org_apache_lucene_analysis_synonym_SynonymGraphFilterFactory.java&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=nlG5z5NcNdIbQAiX-BKNeyLlULCbaezrgocEvPhQkl4&m=WfZ3QMUdvaRJKSSAOkVSI2ud96gdsfnb6_5W_s66ADc&s=gjKepGZ0VZN-2J6s7QgQZs7xeg5qbDwZ8a5soocXnhs&e=
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache_lucene-2Dsolr_blob_master_lucene_analysis_common_src_java_org_apache_lucene_analysis_synonym_SynonymMap.java&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=nlG5z5NcNdIbQAiX-BKNeyLlULCbaezrgocEvPhQkl4&m=WfZ3QMUdvaRJKSSAOkVSI2ud96gdsfnb6_5W_s66ADc&s=ZFSdd4OtF4v3cg7Y5dQV81y82Xt9XvLv-FDYwDbviKo&e=
> >
> >  
> >  
> > -----Original message-----
> >> From:[hidden email] <[hidden email]>
> >> Sent: Monday 15th October 2018 20:52
> >> To: [hidden email]
> >> Subject: An example for creating SynonymMap Object?
> >>
> >> Hi,-
> >>
> >>    is there any example on Lucene domain for creating SynonymMap Object?
> >>
> >> Best regards
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [hidden email]
> >> For additional commands, e-mail: [hidden email]
> >>
> >>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: An example for creating SynonymMap Object?

baris.kazar
Well, query object is defined for searcher and synonyms are handled at index time.
This is not with solr.

i will not add both but then
123 or abc will mean abc or 123
even one mapping is defined then, right?

Best

> On Oct 15, 2018, at 6:30 PM, Markus Jelsma <[hidden email]> wrote:
>
> Hello Baris,
>
> The expand parameter defaults to true, so you should not have to add both rules. If you are using Solr, you can easily check it in the analysis tab. If not, printing the resulting Query object works as well.
>
> Regards,
> Markus
>
>
>
> -----Original message-----
>> From:[hidden email] <[hidden email]>
>> Sent: Monday 15th October 2018 23:03
>> To: [hidden email]
>> Subject: Re: An example for creating SynonymMap Object?
>>
>> Thanks Markus.
>>
>> i am trying to see whether i need to add abc-> 123 and also 123-> abc
>> via builder.add.
>>
>> Best regards
>>
>>
>>
>>> On 10/15/18 3:28 PM, Markus Jelsma wrote:
>>> Hello Baris,
>>>
>>> Check out the filter factory and the map parser for a more low level example:
>>>
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache_lucene-2Dsolr_blob_master_lucene_analysis_common_src_java_org_apache_lucene_analysis_synonym_SynonymGraphFilterFactory.java&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=nlG5z5NcNdIbQAiX-BKNeyLlULCbaezrgocEvPhQkl4&m=WfZ3QMUdvaRJKSSAOkVSI2ud96gdsfnb6_5W_s66ADc&s=gjKepGZ0VZN-2J6s7QgQZs7xeg5qbDwZ8a5soocXnhs&e=
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache_lucene-2Dsolr_blob_master_lucene_analysis_common_src_java_org_apache_lucene_analysis_synonym_SynonymMap.java&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=nlG5z5NcNdIbQAiX-BKNeyLlULCbaezrgocEvPhQkl4&m=WfZ3QMUdvaRJKSSAOkVSI2ud96gdsfnb6_5W_s66ADc&s=ZFSdd4OtF4v3cg7Y5dQV81y82Xt9XvLv-FDYwDbviKo&e=
>>>
>>>    
>>>    
>>> -----Original message-----
>>>> From:[hidden email] <[hidden email]>
>>>> Sent: Monday 15th October 2018 20:52
>>>> To: [hidden email]
>>>> Subject: An example for creating SynonymMap Object?
>>>>
>>>> Hi,-
>>>>
>>>>     is there any example on Lucene domain for creating SynonymMap Object?
>>>>
>>>> Best regards
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]