Limiting an index to only one field

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

Limiting an index to only one field

Daniel Gonzalez
Hello.

I have trouble setting up an index to index only one field from a
CouchDB river.

It is a very simple use case:
- clean ES installation
- one CouchDB river
- one index
- one mapping with one type, with only one field defined.

This is what I do: https://gist.github.com/1688268.

As you can see in a comment attached to the gist, when I do a search I
see that *all* fields have been indexed.
This is not what I want: I only want to index field "note_text" (which
is the only one relevant for search).

Thanks,
Daniel Gonzalez
Reply | Threaded
Open this post in threaded view
|

Re: Limiting an index to only one field

dadoonet
I think that you should use a script to filter your couchDb document.

See here : https://github.com/elasticsearch/elasticsearch-river-couchdb/blob/master/README.md

HTH
David ;-)
@dadoonet


Le 27 janv. 2012 à 12:22, Daniel Gonzalez <[hidden email]> a écrit :

> Hello.
>
> I have trouble setting up an index to index only one field from a
> CouchDB river.
>
> It is a very simple use case:
> - clean ES installation
> - one CouchDB river
> - one index
> - one mapping with one type, with only one field defined.
>
> This is what I do: https://gist.github.com/1688268.
>
> As you can see in a comment attached to the gist, when I do a search I
> see that *all* fields have been indexed.
> This is not what I want: I only want to index field "note_text" (which
> is the only one relevant for search).
>
> Thanks,
> Daniel Gonzalez
Reply | Threaded
Open this post in threaded view
|

Re: Limiting an index to only one field

dadoonet
In reply to this post by Daniel Gonzalez
Or you can define in ES mapping the other fields with store:no index:no and disable source.

David ;-)
@dadoonet


Le 27 janv. 2012 à 12:22, Daniel Gonzalez <[hidden email]> a écrit :

> Hello.
>
> I have trouble setting up an index to index only one field from a
> CouchDB river.
>
> It is a very simple use case:
> - clean ES installation
> - one CouchDB river
> - one index
> - one mapping with one type, with only one field defined.
>
> This is what I do: https://gist.github.com/1688268.
>
> As you can see in a comment attached to the gist, when I do a search I
> see that *all* fields have been indexed.
> This is not what I want: I only want to index field "note_text" (which
> is the only one relevant for search).
>
> Thanks,
> Daniel Gonzalez