# Tokenizer analysis is not working properly in jdbc river

**URL:** <https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952>\
**Category:** Elasticsearch\
**Created:** [October 15, 2013, 5:41am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952 "2013-10-15T05:41:36Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![samaswin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@samaswin](https://discuss.elastic.co/u/samaswin)\
**Post date:** [October 15, 2013, 5:41am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/1 "2013-10-15T05:41:36Z")

</div>

I used the following query,

{  
"type": "jdbc",  
"jdbc": {  
"strategy": "simple",  
"driver": "com.mysql.jdbc.Driver",  
"url": "jdbc:mysql://192.168.43.204:3306/BacheCompany",  
"user": "turbodbuser",  
"password": "turbo@2012",  
"sql": "SELECT DISTINCT b.joMasterID as  
\_id,a.jobStatus,a.joStatusID,b.\*,c.Name FROM joMaster AS b LEFT JOIN  
joStatus AS a ON b.jobstatus=a.joStatusID LEFT JOIN rxMaster AS c ON  
c.rxMasterID=b.rxCustomerID",  
"poll": "10s",  
"autocommit": true  
},  
"index": {  
"index": "turbo1",  
"type": "jobs1",  
"bulk\_timeout": "60s",  
"index\_settings": {  
"analysis": {  
"analyzer": {  
"synonym": {  
"tokenizer": "whitespace",  
"filter": [  
"synonym"  
]  
}  
},  
"filter": {  
"synonym": {  
"type": "synonym",  
"format": "wordnet",  
"synonyms\_path": "analysis/prolog/wn\_s.pl"  
}  
}  
}  
}  
}  
}

But the tokenizer is not working me. Can anyone suggest me the solution

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 15, 2013, 6:07am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/2 "2013-10-15T06:07:39Z")

</div>

Create your index and the mapping first.  
Only then, create the river.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 15 oct. 2013 à 07:41, sam aswin [samaswin@gmail.com](mailto:samaswin@gmail.com) a écrit :

I used the following query,

{  
"type": "jdbc",  
"jdbc": {  
"strategy": "simple",  
"driver": "com.mysql.jdbc.Driver",  
"url": "jdbc:mysql://192.168.43.204:3306/BacheCompany",  
"user": "turbodbuser",  
"password": "turbo@2012",  
"sql": "SELECT DISTINCT b.joMasterID as \_id,a.jobStatus,a.joStatusID,b.\*,c.Name FROM joMaster AS b LEFT JOIN joStatus AS a ON b.jobstatus=a.joStatusID LEFT JOIN rxMaster AS c ON c.rxMasterID=b.rxCustomerID",  
"poll": "10s",  
"autocommit": true  
},  
"index": {  
"index": "turbo1",  
"type": "jobs1",  
"bulk\_timeout": "60s",  
"index\_settings": {  
"analysis": {  
"analyzer": {  
"synonym": {  
"tokenizer": "whitespace",  
"filter": [  
"synonym"  
]  
}  
},  
"filter": {  
"synonym": {  
"type": "synonym",  
"format": "wordnet",  
"synonyms\_path": "analysis/prolog/wn\_s.pl"  
}  
}  
}  
}  
}  
}

## But the tokenizer is not working me. Can anyone suggest me the solution

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![samaswin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@samaswin](https://discuss.elastic.co/u/samaswin)\
**Post date:** [October 15, 2013, 7:51am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/3 "2013-10-15T07:51:02Z")

</div>

Thanks David, I understood the concept.  
I need to configure the wordnet prolog in elasticsearch.  
how can i done that?. The query is,

{  
"index" : {  
"analysis" : {  
"analyzer" : {  
"synonym" : {  
"tokenizer" : "whitespace",  
"filter" : ["synonym"]  
}  
},  
"filter" : {  
"synonym" : {  
"type" : "synonym",  
"format" : "wordnet",  
"synonyms\_path" : "analysis/wn\_s.pl"  
}  
}  
}  
}  
}

But the query still not working. Did I made any mistake

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 15, 2013, 7:54am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/4 "2013-10-15T07:54:12Z")

</div>

You should first try to get the analyzer running as expected without launching any river.

So, basically, create a full curl recreation:

- delete index
- create index with analyzer
- use analyze API to check if your analyzer is correct

If not, GIST your curl recreation and we can have a look at it.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 15 oct. 2013 à 09:51, sam aswin [samaswin@gmail.com](mailto:samaswin@gmail.com) a écrit :

> Thanks David, I understood the concept.  
> I need to configure the wordnet prolog in elasticsearch.  
> how can i done that?. The query is,
> 
> {  
> "index" : {  
> "analysis" : {  
> "analyzer" : {  
> "synonym" : {  
> "tokenizer" : "whitespace",  
> "filter" : ["synonym"]  
> }  
> },  
> "filter" : {  
> "synonym" : {  
> "type" : "synonym",  
> "format" : "wordnet",  
> "synonyms\_path" : "analysis/wn\_s.pl"  
> }  
> }  
> }  
> }  
> }
> 
> But the query still not working. Did I made any mistake
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![samaswin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@samaswin](https://discuss.elastic.co/u/samaswin)\
**Post date:** [October 15, 2013, 7:54am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/5 "2013-10-15T07:54:37Z")

</div>

I created analysis folder in elasticsearch directory. Is this right?

I used the following query,

> {  
> "type": "jdbc",  
> "jdbc": {  
> "strategy": "simple",  
> "driver": "com.mysql.jdbc.Driver",  
> "url": "jdbc:mysql://192.168.43.204:3306/BacheCompany",  
> "user": "turbodbuser",  
> "password": "turbo@2012",  
> "sql": "SELECT DISTINCT b.joMasterID as  
> \_id,a.jobStatus,a.joStatusID,b.\*,c.Name FROM joMaster AS b LEFT JOIN  
> joStatus AS a ON b.jobstatus=a.joStatusID LEFT JOIN rxMaster AS c ON  
> c.rxMasterID=b.rxCustomerID",  
> "poll": "10s",  
> "autocommit": true  
> },  
> "index": {  
> "index": "turbo1",  
> "type": "jobs1",  
> "bulk\_timeout": "60s",  
> "index\_settings": {  
> "analysis": {  
> "analyzer": {  
> "synonym": {  
> "tokenizer": "whitespace",  
> "filter": [  
> "synonym"  
> ]  
> }  
> },  
> "filter": {  
> "synonym": {  
> "type": "synonym",  
> "format": "wordnet",  
> "synonyms\_path": "analysis/prolog/wn\_s.pl"  
> }  
> }  
> }  
> }  
> }  
> }
> 
> But the tokenizer is not working me. Can anyone suggest me the solution

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 15, 2013, 7:58am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/6 "2013-10-15T07:58:10Z")

</div>

As far as I can recall it, I think it should be under config directory. (unsure though)

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 15 oct. 2013 à 09:54, sam aswin [samaswin@gmail.com](mailto:samaswin@gmail.com) a écrit :

> I created analysis folder in elasticsearch directory. Is this right?
> 
> I used the following query,
> 
> {  
> "type": "jdbc",  
> "jdbc": {  
> "strategy": "simple",  
> "driver": "com.mysql.jdbc.Driver",  
> "url": "jdbc:mysql://192.168.43.204:3306/BacheCompany",  
> "user": "turbodbuser",  
> "password": "turbo@2012",  
> "sql": "SELECT DISTINCT b.joMasterID as \_id,a.jobStatus,a.joStatusID,b.\*,c.Name FROM joMaster AS b LEFT JOIN joStatus AS a ON b.jobstatus=a.joStatusID LEFT JOIN rxMaster AS c ON c.rxMasterID=b.rxCustomerID",  
> "poll": "10s",  
> "autocommit": true  
> },  
> "index": {  
> "index": "turbo1",  
> "type": "jobs1",  
> "bulk\_timeout": "60s",  
> "index\_settings": {  
> "analysis": {  
> "analyzer": {  
> "synonym": {  
> "tokenizer": "whitespace",  
> "filter": [  
> "synonym"  
> ]  
> }  
> },  
> "filter": {  
> "synonym": {  
> "type": "synonym",  
> "format": "wordnet",  
> "synonyms\_path": "analysis/prolog/wn\_s.pl"  
> }  
> }  
> }  
> }  
> }  
> }
> 
> But the tokenizer is not working me. Can anyone suggest me the solution
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![samaswin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@samaswin](https://discuss.elastic.co/u/samaswin)\
**Post date:** [October 15, 2013, 8:08am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/7 "2013-10-15T08:08:25Z")

</div>

Thanks David.  
But still the problem is exist. and there is no error in log also.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 15, 2013, 8:14am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/8 "2013-10-15T08:14:30Z")

</div>

Then Gist the full curl recreation.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 15 oct. 2013 à 10:08, sam aswin [samaswin@gmail.com](mailto:samaswin@gmail.com) a écrit :

> ## Thanks David. But still the problem is exist. and there is no error in log also.
> 
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![samaswin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@samaswin](https://discuss.elastic.co/u/samaswin)\
**Post date:** [October 15, 2013, 8:18am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/9 "2013-10-15T08:18:36Z")

</div>

I use RESTClient in firfox,

Index mapping  
Put:  
[http://localhost:9200/projects/](http://localhost:9200/projects/)  
{  
"index" : {  
"analysis" : {  
"analyzer" : {  
"synonym" : {  
"tokenizer" : "whitespace",  
"filter" : ["synonym"]  
}  
},  
"filter" : {  
"synonym" : {  
"type" : "synonym",  
"format" : "wordnet",  
"synonyms\_path" : "analysis/wn\_s.pl"  
}  
}  
}  
}  
}

Put;  
[http://localhost:9200/projects/project/2](http://localhost:9200/projects/project/2)  
{  
"name" : "child"  
}

[http://localhost:9200/projects/project/2](http://localhost:9200/projects/project/2)  
{  
"name" : "baby"  
}

Post:  
[http://localhost:9200/projects/\_search?pretty=true](http://localhost:9200/projects/_search?pretty=true)  
{  
"query": {  
"query\_string": {  
"query": "child"  
}  
}

}

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 15, 2013, 8:46am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/10 "2013-10-15T08:46:16Z")

</div>

What output do you get?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 15 oct. 2013 à 10:18, sam aswin [samaswin@gmail.com](mailto:samaswin@gmail.com) a écrit :

> I use RESTClient in firfox,
> 
> Index mapping  
> Put:  
> [http://localhost:9200/projects/](http://localhost:9200/projects/)  
> {  
> "index" : {  
> "analysis" : {  
> "analyzer" : {  
> "synonym" : {  
> "tokenizer" : "whitespace",  
> "filter" : ["synonym"]  
> }  
> },  
> "filter" : {  
> "synonym" : {  
> "type" : "synonym",  
> "format" : "wordnet",  
> "synonyms\_path" : "analysis/wn\_s.pl"  
> }  
> }  
> }  
> }  
> }
> 
> Put;  
> [http://localhost:9200/projects/project/2](http://localhost:9200/projects/project/2)  
> {  
> "name" : "child"  
> }
> 
> [http://localhost:9200/projects/project/2](http://localhost:9200/projects/project/2)  
> {  
> "name" : "baby"  
> }
> 
> Post:  
> [http://localhost:9200/projects/\_search?pretty=true](http://localhost:9200/projects/_search?pretty=true)  
> {  
> "query": {  
> "query\_string": {  
> "query": "child"  
> }  
> }
> 
> }
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![samaswin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@samaswin](https://discuss.elastic.co/u/samaswin)\
**Post date:** [October 15, 2013, 8:47am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/11 "2013-10-15T08:47:13Z")

</div>

1. {
2. 

```
"took": 2,

```

3. 

```
"timed_out": false,

```

4. 

```
"_shards":

```

5. 

```
{

```

6. 

```
    "total": 1,

```

7. 

```
    "successful": 1,

```

8. 

```
    "failed": 0

```

9. 

```
},

```

10. 

```
"hits":

```

11. 

```
{

```

12. 

```
    "total": 1,

```

13. 

```
    "max_score": 1,

```

14. 

```
    "hits":

```

15. 

```
    [

```

16. 

```
        {

```

17. 

```
            "_index": "projects",

```

18. 

```
            "_type": "project",

```

19. 

```
            "_id": "3",

```

20. 

```
            "_score": 1,

```

21. 

```
            "_source":

```

22. 

```
            {

```

23. 

```
                "name": "kid"

```

24. 

```
            }

```

25. 

```
        }

```

26. 

```
    ]

```

27. 

```
}

```

28. }

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![samaswin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@samaswin](https://discuss.elastic.co/u/samaswin)\
**Post date:** [October 15, 2013, 8:48am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/12 "2013-10-15T08:48:16Z")

</div>

1. {
2. 

```
"took": 2,

```

3. 

```
"timed_out": false,

```

4. 

```
"_shards":

```

5. 

```
{

```

6. 

```
    "total": 1,

```

7. 

```
    "successful": 1,

```

8. 

```
    "failed": 0

```

9. 

```
},

```

10. 

```
"hits":

```

11. 

```
{

```

12. 

```
    "total": 1,

```

13. 

```
    "max_score": 1,

```

14. 

```
    "hits":

```

15. 

```
    [

```

16. 

```
        {

```

17. 

```
            "_index": "projects",

```

18. 

```
            "_type": "project",

```

19. 

```
            "_id": "3",

```

20. 

```
            "_score": 1,

```

21. 

```
            "_source":

```

22. 

```
            {

```

23. 

```
                "name": "child"

```

24. 

```
            }

```

25. 

```
        }

```

26. 

```
    ]

```

27. 

```
}

```

28. }

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 15, 2013, 8:54am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/13 "2013-10-15T08:54:01Z")

</div>

So baby and child are synonyms in your file, right?  
And you expect 2 results right?

In your example you set the same id for both docs. So you replaced the old one.

I think it's a typo but unsure.

It will help a lot if you Gist a full curl recreation (with synonym file as well).

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 15 oct. 2013 à 10:48, sam aswin [samaswin@gmail.com](mailto:samaswin@gmail.com) a écrit :

> ## { "took": 2, "timed\_out": false, "\_shards": { "total": 1, "successful": 1, "failed": 0 }, "hits": { "total": 1, "max\_score": 1, "hits": [{ "\_index": "projects", "\_type": "project", "\_id": "3", "\_score": 1, "\_source": { "name": "child" } }] } }
> 
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![samaswin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@samaswin](https://discuss.elastic.co/u/samaswin)\
**Post date:** [October 15, 2013, 8:58am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/14 "2013-10-15T08:58:52Z")

</div>

Yes I need the two results. But above is the type mistake. If I search  
GET:  
[http://localhost:9200/projects/\_search?pretty=true](http://localhost:9200/projects/_search?pretty=true)

The results:

1. {
2. 

```
"took": 1,

```

3. 

```
"timed_out": false,

```

4. 

```
"_shards":

```

5. 

```
{

```

6. 

```
    "total": 1,

```

7. 

```
    "successful": 1,

```

8. 

```
    "failed": 0

```

9. 

```
},

```

10. 

```
"hits":

```

11. 

```
{

```

12. 

```
    "total": 2,

```

13. 

```
    "max_score": 1,

```

14. 

```
    "hits":

```

15. 

```
    [

```

16. 

```
        {

```

17. 

```
            "_index": "projects",

```

18. 

```
            "_type": "project",

```

19. 

```
            "_id": "1",

```

20. 

```
            "_score": 1,

```

21. 

```
            "_source":

```

22. 

```
            {

```

23. 

```
                "name": "child"

```

24. 

```
            }

```

25. 

```
        },

```

26. 

```
        {

```

27. 

```
            "_index": "projects",

```

28. 

```
            "_type": "project",

```

29. 

```
            "_id": "3",

```

30. 

```
            "_score": 1,

```

31. 

```
            "_source":

```

32. 

```
            {

```

33. 

```
                "name": "kid"

```

34. 

```
            }

```

35. 

```
        }

```

36. 

```
    ]

```

37. 

```
}

```

38. }

Above are the typo mistakes. I add it for reference.

On Tuesday, 15 October 2013 14:24:01 UTC+5:30, David Pilato wrote:

> So baby and child are synonyms in your file, right?  
> And you expect 2 results right?
> 
> In your example you set the same id for both docs. So you replaced the old  
> one.
> 
> I think it's a typo but unsure.
> 
> It will help a lot if you Gist a full curl recreation (with synonym file  
> as well).
> 
> --

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![samaswin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@samaswin](https://discuss.elastic.co/u/samaswin)\
**Post date:** [October 15, 2013, 9:04am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/15 "2013-10-15T09:04:20Z")

</div>

I removed the entire index and recreated. Still i got the same problem.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![samaswin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@samaswin](https://discuss.elastic.co/u/samaswin)\
**Post date:** [October 15, 2013, 9:22am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/16 "2013-10-15T09:22:47Z")

</div>

PUT:

[http://localhost:9200/projects/](http://localhost:9200/projects/)

{  
"index": {  
"analysis": {  
"analyzer": {  
"synonym": {  
"tokenizer": "whitespace",  
"filter": [  
"synonym"  
]  
}  
},  
"filter": {  
"synonym": {  
"type": "synonym",  
"format": "wordnet",  
"synonyms\_path": "analysis/wn\_s.pl"  
}  
}  
}  
}  
}

PUT:  
[http://localhost:9200/projects/project/1](http://localhost:9200/projects/project/1)

{  
"name" : "kid"  
}

[http://localhost:9200/projects/project/2](http://localhost:9200/projects/project/2)

{  
"name" : "child"  
}

POST:  
[http://localhost:9200/projects/\_search?pretty=true](http://localhost:9200/projects/_search?pretty=true)  
{  
"query": {  
"query\_string": {  
"query": "child"  
}  
}  
}

analysis folder:  
/usr/share/elasticsearch/config/analysis/

Wordnet prolog file is:  
/usr/share/elasticsearch/config/analysis/wn\_s.pl

Wordnet version is 3.0

RESULT:

1. {
2. 

```
"took": 1,

```

3. 

```
"timed_out": false,

```

4. 

```
"_shards":

```

5. 

```
{

```

6. 

```
    "total": 1,

```

7. 

```
    "successful": 1,

```

8. 

```
    "failed": 0

```

9. 

```
},

```

10. 

```
"hits":

```

11. 

```
{

```

12. 

```
    "total": 1,

```

13. 

```
    "max_score": 1,

```

14. 

```
    "hits":

```

15. 

```
    [

```

16. 

```
        {

```

17. 

```
            "_index": "projects",

```

18. 

```
            "_type": "project",

```

19. 

```
            "_id": "2",

```

20. 

```
            "_score": 1,

```

21. 

```
            "_source":

```

22. 

```
            {

```

23. 

```
                "name": "child"

```

24. 

```
            }

```

25. 

```
        }

```

26. 

```
    ]

```

27. 

```
}

```

28. }

Expected Result:

kid and child should be display.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [October 15, 2013, 9:28am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/17 "2013-10-15T09:28:30Z")

</div>

You forgot the mapping for the field "name", compare your commands to

> <https://gist.github.com/jprante/6968540>

Jörg

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![samaswin](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@samaswin](https://discuss.elastic.co/u/samaswin)\
**Post date:** [October 15, 2013, 9:43am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/18 "2013-10-15T09:43:28Z")

</div>

Thank Jorg,  
I solved my problem. Thanks David for your help

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:12am UTC](https://discuss.elastic.co/t/tokenizer-analysis-is-not-working-properly-in-jdbc-river/13952/19 "2017-07-06T02:12:23Z")

</div>


