lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Rowe <sar...@gmail.com>
Subject Re: analyzer for _text_ field
Date Sat, 16 Jul 2016 15:22:00 GMT
Waldyr,

I don’t understand your first question - are you asking how to change the schema without
using the Schema API?

About phonetic matching: there are several different phonetic token filters provided with
Solr - see <https://cwiki.apache.org/confluence/display/solr/Phonetic+Matching>.

--
Steve
www.lucidworks.com

> On Jul 16, 2016, at 5:26 AM, Waldyr Neto <wafeneto@gmail.com> wrote:
> 
> tks, it works :)
> 
> but do you know how i could do this, thange the _text_ analyzer using
> schemas? maybe in any point i could change the default analyzer. what i
> really need is to use any analyzer that work with phonetic search in the
> content of my files;
> 
> On Fri, Jul 15, 2016 at 10:11 PM, Waldyr Neto <wafeneto@gmail.com> wrote:
> 
>> tks a lot, i'll try soon and give u a feed back :)
>> 
>> On Fri, Jul 15, 2016 at 4:07 PM, David Santamauro <
>> david.santamauro@gmail.com> wrote:
>> 
>>> 
>>> The opening and closing single quotes don't match
>>> 
>>> -data-binary '{ ... }’
>>> 
>>> it should be:
>>> 
>>> -data-binary '{ ... }'
>>> 
>>> 
>>> 
>>> On 07/15/2016 02:59 PM, Steve Rowe wrote:
>>> 
>>>> Waldyr, maybe it got mangled by my email client or yours?
>>>> 
>>>> Here’s the same command:
>>>> 
>>>>   <https://gist.github.com/sarowe/db2fcd168eb77d7278f716ac75bfb9e9>
>>>> 
>>>> --
>>>> Steve
>>>> www.lucidworks.com
>>>> 
>>>> On Jul 15, 2016, at 2:16 PM, Waldyr Neto <wafeneto@gmail.com> wrote:
>>>>> 
>>>>> Hy Steves, tks for the help
>>>>> unfortunately i'm making some mistake
>>>>> 
>>>>> when i try to run
>>>>> 
>>>>>> 
>>>>>>> curl -X POST -H 'Content-type: application/json’ \
>>>>> http://localhost:8983/solr/gettingstarted/schema --data-binary
>>>>> '{"add-field-type": { "name": "my_new_field_type", "class":
>>>>> "solr.TextField","analyzer": {"charFilters": [{"class":
>>>>> "solr.HTMLStripCharFilterFactory"}], "tokenizer": {"class":
>>>>> "solr.StandardTokenizerFactory"},"filters":[{"class":
>>>>> "solr.WordDelimiterFilterFactory"}, {"class":
>>>>> "solr.LowerCaseFilterFactory"}]}},"replace-field": { "name":
>>>>> "_text_","type": "my_new_field_type", "multiValued": "true","indexed":
>>>>> "true","stored": "false"}}’
>>>>> 
>>>>> i receave the folow error msg from curl program
>>>>> :
>>>>> 
>>>>> curl: (3) [globbing] unmatched brace in column 1
>>>>> 
>>>>> curl: (6) Could not resolve host: name
>>>>> 
>>>>> curl: (6) Could not resolve host: my_new_field_type,
>>>>> 
>>>>> curl: (6) Could not resolve host: class
>>>>> 
>>>>> curl: (6) Could not resolve host: solr.TextField,analyzer
>>>>> 
>>>>> curl: (3) [globbing] unmatched brace in column 1
>>>>> 
>>>>> curl: (3) [globbing] bad range specification in column 2
>>>>> 
>>>>> curl: (3) [globbing] unmatched close brace/bracket in column 32
>>>>> 
>>>>> curl: (6) Could not resolve host: tokenizer
>>>>> 
>>>>> curl: (3) [globbing] unmatched brace in column 1
>>>>> 
>>>>> curl: (3) [globbing] unmatched close brace/bracket in column 30
>>>>> 
>>>>> curl: (3) [globbing] unmatched close brace/bracket in column 32
>>>>> 
>>>>> curl: (3) [globbing] unmatched brace in column 1
>>>>> 
>>>>> curl: (3) [globbing] unmatched close brace/bracket in column 28
>>>>> 
>>>>> curl: (3) [globbing] unmatched brace in column 1
>>>>> 
>>>>> curl: (6) Could not resolve host: name
>>>>> 
>>>>> curl: (6) Could not resolve host: _text_,type
>>>>> 
>>>>> curl: (6) Could not resolve host: my_new_field_type,
>>>>> 
>>>>> curl: (6) Could not resolve host: multiValued
>>>>> 
>>>>> curl: (6) Could not resolve host: true,indexed
>>>>> 
>>>>> curl: (6) Could not resolve host: true,stored
>>>>> 
>>>>> curl: (3) [globbing] unmatched close brace/bracket in column 6
>>>>> 
>>>>> cvs1:~ vvisionphp1$
>>>>> 
>>>>> On Fri, Jul 15, 2016 at 2:45 PM, Steve Rowe <sarowe@gmail.com>
wrote:
>>>>> 
>>>>> Hi Waldyr,
>>>>>> 
>>>>>> An example of changing the _text_ analyzer by first creating a new
>>>>>> field
>>>>>> type, and then changing the _text_ field to use the new field type
>>>>>> (after
>>>>>> starting Solr 6.1 with “bin/solr start -e schemaless”):
>>>>>> 
>>>>>> -----
>>>>>> PROMPT$ curl -X POST -H 'Content-type: application/json’ \
>>>>>>    http://localhost:8983/solr/gettingstarted/schema --data-binary
'{
>>>>>>  "add-field-type": {
>>>>>>    "name": "my_new_field_type",
>>>>>>    "class": "solr.TextField",
>>>>>>    "analyzer": {
>>>>>>      "charFilters": [{
>>>>>>        "class": "solr.HTMLStripCharFilterFactory"
>>>>>>      }],
>>>>>>      "tokenizer": {
>>>>>>        "class": "solr.StandardTokenizerFactory"
>>>>>>      },
>>>>>>      "filters":[{
>>>>>>          "class": "solr.WordDelimiterFilterFactory"
>>>>>>        }, {
>>>>>>          "class": "solr.LowerCaseFilterFactory"
>>>>>>      }]}},
>>>>>>  "replace-field": {
>>>>>>    "name": "_text_",
>>>>>>    "type": "my_new_field_type",
>>>>>>    "multiValued": "true",
>>>>>>    "indexed": "true",
>>>>>>    "stored": "false"
>>>>>>  }}’
>>>>>> -----
>>>>>> 
>>>>>> PROMPT$ curl
>>>>>> http://localhost:8983/solr/gettingstarted/schema/fields/_text_
>>>>>> 
>>>>>> -----
>>>>>> {
>>>>>>  "responseHeader”:{ […] },
>>>>>>  "field":{
>>>>>>    "name":"_text_",
>>>>>>    "type":"my_new_field_type",
>>>>>>    "multiValued":true,
>>>>>>    "indexed":true,
>>>>>>    "stored":false}}
>>>>>> -----
>>>>>> 
>>>>>> --
>>>>>> Steve
>>>>>> www.lucidworks.com
>>>>>> 
>>>>>> On Jul 15, 2016, at 12:54 PM, Waldyr Neto <wafeneto@gmail.com>
wrote:
>>>>>>> 
>>>>>>> Hy, How can i configure the analyzer for the _text_ field?
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>> 
>> 


Mime
View raw message