Limiting an index to only one field


(Daniel Gonzalez) #1

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


(David Pilato) #2

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 :wink:
@dadoonet

Le 27 janv. 2012 à 12:22, Daniel Gonzalez gonvaled@gmail.com 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


(David Pilato) #3

Or you can define in ES mapping the other fields with store:no index:no and disable source.

David :wink:
@dadoonet

Le 27 janv. 2012 à 12:22, Daniel Gonzalez gonvaled@gmail.com 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


(system) #4