"index":"no" does not work

Hi,
I'm using dynamic mapping for indexing. Above you can see PHP
structure of data.

array("mailing_index" =>
array("properties" =>
array(
"f_id" =>
array("type" => "long"),
"f_from" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_subject" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_body" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_reply_to" =>
array("type" => "string",
"index" => "no"),
"f_type" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_status" =>
array("type" => "integer",
"index" => "no"),
"f_datetime" =>
array("type" => "long",
"index" => "not_analyzed"),
"f_userid" =>
array("type" => "long",
"index" => "not_analyzed"),
)
)
)

As you can see "f_reply_to" field marked as "index" => "no". But I am
able to perform search by this field. In documentation of elastic
search we can find a line " "index:no" means that it won’t be
searchable at all". Used the 0.17.6 version of elasticsearch. Same
behavior for 0.17.0.

Maybe I'm doing something wrong, please help me to understand the
situation.

//////////////////////// config file
content //////////////////////////////////
node :
data : true
gateway :
type : fs
index :
analysis :
analyzer :
default :
type : custom
tokenizer : standard
filter : [standard, lowercase, porterStem, stop]

network.publish_host: 127.0.0.1
network.bind_host: 127.0.0.1
network.host: 127.0.0.1

node.data: true # Default

http.port: 9200 # Default

cluster.name: "TestCluster"

//////////////////////// end of config file
content ////////////////////////////////

Thanks in advance
H. Avetsyan

Two things: How do you search for the value? Do you search against the
specific field? By default, it is added to the _all field (and its the
default field being searched on). You can disable it from being added to the
_all field as well. Also, make sure the mapping you set is actually the
mapping you identified by elasticsearch, use the get mapping API to check it
out.

On Wed, Aug 17, 2011 at 12:47 PM, hamazasp.avetisyan <
hamazasp.avetisyan@gmail.com> wrote:

Hi,
I'm using dynamic mapping for indexing. Above you can see PHP
structure of data.

array("mailing_index" =>
array("properties" =>
array(
"f_id" =>
array("type" => "long"),
"f_from" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_subject" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_body" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_reply_to" =>
array("type" => "string",
"index" => "no"),
"f_type" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_status" =>
array("type" => "integer",
"index" => "no"),
"f_datetime" =>
array("type" => "long",
"index" => "not_analyzed"),
"f_userid" =>
array("type" => "long",
"index" => "not_analyzed"),
)
)
)

As you can see "f_reply_to" field marked as "index" => "no". But I am
able to perform search by this field. In documentation of elastic
search we can find a line " "index:no" means that it won’t be
searchable at all". Used the 0.17.6 version of elasticsearch. Same
behavior for 0.17.0.

Maybe I'm doing something wrong, please help me to understand the
situation.

//////////////////////// config file
content //////////////////////////////////
node :
data : true
gateway :
type : fs
index :
analysis :
analyzer :
default :
type : custom
tokenizer : standard
filter : [standard, lowercase, porterStem, stop]

network.publish_host: 127.0.0.1
network.bind_host: 127.0.0.1
network.host: 127.0.0.1

node.data: true # Default

http.port: 9200 # Default

cluster.name: "TestCluster"

//////////////////////// end of config file
content ////////////////////////////////

Thanks in advance
H. Avetsyan

Hi, thank you for reply!

For mapping I am using the following URL

host:port/my_db/mailing_index/_mapping

As you can see no "_all" specified

For searching I am using the following URL
host:port/TestCluster/mailing_index/_search

The argument for sort operation contains just a Boolean condition(with
query string), limits and sorting. No "_all" specified.

I've checked the structure of index using get mapping API, everything
is OK (as I specified in argument for mapping).

So the issue still exists.

Best regards,
H.Avetisyan

On Aug 17, 4:42 pm, Shay Banon kim...@gmail.com wrote:

Two things: How do you search for the value? Do you search against the
specific field? By default, it is added to the _all field (and its the
default field being searched on). You can disable it from being added to the
_all field as well. Also, make sure the mapping you set is actually the
mapping you identified by elasticsearch, use the get mapping API to check it
out.

On Wed, Aug 17, 2011 at 12:47 PM, hamazasp.avetisyan <

hamazasp.avetis...@gmail.com> wrote:

Hi,
I'm using dynamic mapping for indexing. Above you can see PHP
structure of data.

array("mailing_index" =>
array("properties" =>
array(
"f_id" =>
array("type" => "long"),
"f_from" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_subject" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_body" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_reply_to" =>
array("type" => "string",
"index" => "no"),
"f_type" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_status" =>
array("type" => "integer",
"index" => "no"),
"f_datetime" =>
array("type" => "long",
"index" => "not_analyzed"),
"f_userid" =>
array("type" => "long",
"index" => "not_analyzed"),
)
)
)

As you can see "f_reply_to" field marked as "index" => "no". But I am
able to perform search by this field. In documentation of elastic
search we can find a line " "index:no" means that it won’t be
searchable at all". Used the 0.17.6 version of elasticsearch. Same
behavior for 0.17.0.

Maybe I'm doing something wrong, please help me to understand the
situation.

//////////////////////// config file
content //////////////////////////////////
node :
data : true
gateway :
type : fs
index :
analysis :
analyzer :
default :
type : custom
tokenizer : standard
filter : [standard, lowercase, porterStem, stop]

network.publish_host: 127.0.0.1
network.bind_host: 127.0.0.1
network.host: 127.0.0.1

node.data: true # Default

http.port: 9200 # Default

cluster.name: "TestCluster"

//////////////////////// end of config file
content ////////////////////////////////

Thanks in advance
H. Avetsyan

Hi, thank you for reply!

For mapping I am using the following URL
host:port/my_db/mailing_index/_mapping

As you can see no "_all" specified

For searching I am using the following URL
host:port/my_db/mailing_index/_search

The argument for sort operation contains just a Boolean
condition(with
query string), limits and sorting. No "_all" specified.

I've checked the structure of index using get mapping API, everything
is OK (as I specified in argument for mapping).
So the issue still exists.

Best regards,
H.Avetisyan

On Aug 17, 4:42 pm, Shay Banon kim...@gmail.com wrote:

Two things: How do you search for the value? Do you search against the
specific field? By default, it is added to the _all field (and its the
default field being searched on). You can disable it from being added to the
_all field as well. Also, make sure the mapping you set is actually the
mapping you identified by elasticsearch, use the get mapping API to check it
out.

On Wed, Aug 17, 2011 at 12:47 PM, hamazasp.avetisyan <

hamazasp.avetis...@gmail.com> wrote:

Hi,
I'm using dynamic mapping for indexing. Above you can see PHP
structure of data.

array("mailing_index" =>
array("properties" =>
array(
"f_id" =>
array("type" => "long"),
"f_from" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_subject" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_body" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_reply_to" =>
array("type" => "string",
"index" => "no"),
"f_type" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_status" =>
array("type" => "integer",
"index" => "no"),
"f_datetime" =>
array("type" => "long",
"index" => "not_analyzed"),
"f_userid" =>
array("type" => "long",
"index" => "not_analyzed"),
)
)
)

As you can see "f_reply_to" field marked as "index" => "no". But I am
able to perform search by this field. In documentation of elastic
search we can find a line " "index:no" means that it won’t be
searchable at all". Used the 0.17.6 version of elasticsearch. Same
behavior for 0.17.0.

Maybe I'm doing something wrong, please help me to understand the
situation.

//////////////////////// config file
content //////////////////////////////////
node :
data : true
gateway :
type : fs
index :
analysis :
analyzer :
default :
type : custom
tokenizer : standard
filter : [standard, lowercase, porterStem, stop]

network.publish_host: 127.0.0.1
network.bind_host: 127.0.0.1
network.host: 127.0.0.1

node.data: true # Default

http.port: 9200 # Default

cluster.name: "TestCluster"

//////////////////////// end of config file
content ////////////////////////////////

Thanks in advance
H. Avetsyan

Hi, thank you for reply!

For mapping I am using the following URL
host:port/my_db/mailing_index/_mapping

As you can see no "_all" specified

For searching I am using the following URL
host:port/TestCluster/mailing_index/_search

The argument for search contains a Boolean condition(with
query string), limits and sorting. No "_all" specified.

I've checked the structure of index using get mapping API, everything
is OK (as I specified in argument for mapping).
So the issue still exists.
Best regards,
H.Avetisyan

On Aug 17, 4:42 pm, Shay Banon kim...@gmail.com wrote:

Two things: How do you search for the value? Do you search against the
specific field? By default, it is added to the _all field (and its the
default field being searched on). You can disable it from being added to the
_all field as well. Also, make sure the mapping you set is actually the
mapping you identified by elasticsearch, use the get mapping API to check it
out.

On Wed, Aug 17, 2011 at 12:47 PM, hamazasp.avetisyan <

hamazasp.avetis...@gmail.com> wrote:

Hi,
I'm using dynamic mapping for indexing. Above you can see PHP
structure of data.

array("mailing_index" =>
array("properties" =>
array(
"f_id" =>
array("type" => "long"),
"f_from" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_subject" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_body" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_reply_to" =>
array("type" => "string",
"index" => "no"),
"f_type" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_status" =>
array("type" => "integer",
"index" => "no"),
"f_datetime" =>
array("type" => "long",
"index" => "not_analyzed"),
"f_userid" =>
array("type" => "long",
"index" => "not_analyzed"),
)
)
)

As you can see "f_reply_to" field marked as "index" => "no". But I am
able to perform search by this field. In documentation of elastic
search we can find a line " "index:no" means that it won’t be
searchable at all". Used the 0.17.6 version of elasticsearch. Same
behavior for 0.17.0.

Maybe I'm doing something wrong, please help me to understand the
situation.

//////////////////////// config file
content //////////////////////////////////
node :
data : true
gateway :
type : fs
index :
analysis :
analyzer :
default :
type : custom
tokenizer : standard
filter : [standard, lowercase, porterStem, stop]

network.publish_host: 127.0.0.1
network.bind_host: 127.0.0.1
network.host: 127.0.0.1

node.data: true # Default

http.port: 9200 # Default

cluster.name: "TestCluster"

//////////////////////// end of config file
content ////////////////////////////////

Thanks in advance
H. Avetsyan

Hi, thank you for reply!

For mapping I am using the following URL
host:port/my_db/mailing_index/_mapping

As you can see no "_all" specified.

For searching I am using the following URL
host:port/my_db/mailing_index/_search

The argument for search operation contains a Boolean condition(with
query string), limits and sorting. No "_all" specified.

I've checked the structure of index using get mapping API, everything
is OK (as I specified in argument for mapping).

So the issue still exists.
Best regards,
H.Avetisyan

On Aug 17, 4:42 pm, Shay Banon kim...@gmail.com wrote:

Two things: How do you search for the value? Do you search against the
specific field? By default, it is added to the _all field (and its the
default field being searched on). You can disable it from being added to the
_all field as well. Also, make sure the mapping you set is actually the
mapping you identified by elasticsearch, use the get mapping API to check it
out.

On Wed, Aug 17, 2011 at 12:47 PM, hamazasp.avetisyan <

hamazasp.avetis...@gmail.com> wrote:

Hi,
I'm using dynamic mapping for indexing. Above you can see PHP
structure of data.

array("mailing_index" =>
array("properties" =>
array(
"f_id" =>
array("type" => "long"),
"f_from" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_subject" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_body" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_reply_to" =>
array("type" => "string",
"index" => "no"),
"f_type" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_status" =>
array("type" => "integer",
"index" => "no"),
"f_datetime" =>
array("type" => "long",
"index" => "not_analyzed"),
"f_userid" =>
array("type" => "long",
"index" => "not_analyzed"),
)
)
)

As you can see "f_reply_to" field marked as "index" => "no". But I am
able to perform search by this field. In documentation of elastic
search we can find a line " "index:no" means that it won’t be
searchable at all". Used the 0.17.6 version of elasticsearch. Same
behavior for 0.17.0.

Maybe I'm doing something wrong, please help me to understand the
situation.

//////////////////////// config file
content //////////////////////////////////
node :
data : true
gateway :
type : fs
index :
analysis :
analyzer :
default :
type : custom
tokenizer : standard
filter : [standard, lowercase, porterStem, stop]

network.publish_host: 127.0.0.1
network.bind_host: 127.0.0.1
network.host: 127.0.0.1

node.data: true # Default

http.port: 9200 # Default

cluster.name: "TestCluster"

//////////////////////// end of config file
content ////////////////////////////////

Thanks in advance
H. Avetsyan

What I meant is what type of query do you execute when you say it does not
work?

On Thu, Aug 18, 2011 at 11:20 AM, hamazasp.avetisyan <
hamazasp.avetisyan@gmail.com> wrote:

Hi, thank you for reply!

For mapping I am using the following URL

host:port/my_db/mailing_index/_mapping

As you can see no "_all" specified

For searching I am using the following URL
host:port/TestCluster/mailing_index/_search

The argument for sort operation contains just a Boolean condition(with
query string), limits and sorting. No "_all" specified.

I've checked the structure of index using get mapping API, everything
is OK (as I specified in argument for mapping).

So the issue still exists.

Best regards,
H.Avetisyan

On Aug 17, 4:42 pm, Shay Banon kim...@gmail.com wrote:

Two things: How do you search for the value? Do you search against the
specific field? By default, it is added to the _all field (and its the
default field being searched on). You can disable it from being added to
the
_all field as well. Also, make sure the mapping you set is actually the
mapping you identified by elasticsearch, use the get mapping API to check
it
out.

On Wed, Aug 17, 2011 at 12:47 PM, hamazasp.avetisyan <

hamazasp.avetis...@gmail.com> wrote:

Hi,
I'm using dynamic mapping for indexing. Above you can see PHP
structure of data.

array("mailing_index" =>
array("properties" =>
array(
"f_id" =>
array("type" => "long"),
"f_from" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_subject" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_body" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_reply_to" =>
array("type" => "string",
"index" => "no"),
"f_type" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_status" =>
array("type" => "integer",
"index" => "no"),
"f_datetime" =>
array("type" => "long",
"index" => "not_analyzed"),
"f_userid" =>
array("type" => "long",
"index" => "not_analyzed"),
)
)
)

As you can see "f_reply_to" field marked as "index" => "no". But I am
able to perform search by this field. In documentation of elastic
search we can find a line " "index:no" means that it won’t be
searchable at all". Used the 0.17.6 version of elasticsearch. Same
behavior for 0.17.0.

Maybe I'm doing something wrong, please help me to understand the
situation.

//////////////////////// config file
content //////////////////////////////////
node :
data : true
gateway :
type : fs
index :
analysis :
analyzer :
default :
type : custom
tokenizer : standard
filter : [standard, lowercase, porterStem, stop]

network.publish_host: 127.0.0.1
network.bind_host: 127.0.0.1
network.host: 127.0.0.1

node.data: true # Default

http.port: 9200 # Default

cluster.name: "TestCluster"

//////////////////////// end of config file
content ////////////////////////////////

Thanks in advance
H. Avetsyan

On Wed, 2011-08-17 at 14:42 +0300, Shay Banon wrote:

Two things: How do you search for the value? Do you search against the
specific field? By default, it is added to the _all field (and its the
default field being searched on). You can disable it from being added
to the _all field as well. Also, make sure the mapping you set is
actually the mapping you identified by elasticsearch, use the get
mapping API to check it out.

Note: there is an issue open to disable include_in_all when index: "no"
is specified, as it is more Do-What-I-Mean

clint

On Wed, Aug 17, 2011 at 12:47 PM, hamazasp.avetisyan
hamazasp.avetisyan@gmail.com wrote:
Hi,
I'm using dynamic mapping for indexing. Above you can see PHP
structure of data.

    array("mailing_index" =>
                               array("properties" =>
                                       array(
                                       "f_id" =>
                                           array("type" =>
    "long"),
                                       "f_from" =>
                                           array("type" =>
    "string",
    "index" => "analyzed", "analyzer" => "default"),
                                       "f_subject" =>
                                           array("type" =>
    "string",
    "index" => "not_analyzed"),
                                       "f_body" =>
                                           array("type" =>
    "string",
    "index" => "analyzed", "analyzer" => "default"),
                                       "f_reply_to" =>
                                           array("type" =>
    "string",
    "index" => "no"),
                                       "f_type" =>
                                           array("type" =>
    "string",
    "index" => "not_analyzed"),
                                       "f_status" =>
                                           array("type" =>
    "integer",
    "index" => "no"),
                                       "f_datetime" =>
                                           array("type" => "long",
    "index" => "not_analyzed"),
                                       "f_userid" =>
                                           array("type" => "long",
    "index" => "not_analyzed"),
                                                   )
                                    )
                               )
    
    As you can see "f_reply_to" field marked as "index" => "no".
    But I am
    able to perform search by this field. In documentation of
    elastic
    search we can find a line " "index:no" means that it won’t be
    searchable at all". Used the 0.17.6 version of elasticsearch.
    Same
    behavior for 0.17.0.
    
    Maybe I'm doing something wrong, please help me to understand
    the
    situation.
    
    ////////////////////////   config file
    content //////////////////////////////////
    node :
       data : true
    gateway :
       type : fs
    index :
       analysis :
           analyzer :
               default :
                   type : custom
                   tokenizer : standard
                   filter : [standard, lowercase, porterStem,
    stop]
    
    
    network.publish_host:                   127.0.0.1
    network.bind_host:                      127.0.0.1
    network.host:                           127.0.0.1
    
    node.data:                              true    # Default
    
    http.port:                              9200    # Default
    
    cluster.name:                              "TestCluster"
    
    //////////////////////// end of config file
    content ////////////////////////////////
    
    Thanks in advance
    H. Avetsyan

Hi Shay!

Below you can see the flow that I am passing through.

curl -XDELETE 'http://localhost:9200/test'

curl -XPUT 'http://localhost:9200/test'

curl -XPUT "http://localhost:9200/test/type1/_mapping" -d '{ "type1" :
{ "properties" : { "field1" : {"type" : "string", "index" : "no"},
"field2" : {"type" : "string", "index" : "analyzed"} } } }'

curl -XPUT 'http://localhost:9200/test/type1/1' -d '{ field1: "edo1",
field2: "aaa" }'
curl -XPUT 'http://localhost:9200/test/type1/2' -d '{ field1: "edo2",
field2: "bbb" }'
curl -XPUT 'http://localhost:9200/test/type1/3' -d '{ field1: "edo3",
field2: "ccc" }'

curl -XGET 127.0.0.1:9200/test/_search -d '{"query":{"query_string":
{"query":"edo1"}}}'

The last search line returns the first document, but it has type
"filed1" that created as "index":"no". This is the actual problem.

On Aug 18, 5:09 pm, Shay Banon kim...@gmail.com wrote:

What I meant is what type of query do you execute when you say it does not
work?

On Thu, Aug 18, 2011 at 11:20 AM, hamazasp.avetisyan <

hamazasp.avetis...@gmail.com> wrote:

Hi, thank you for reply!

For mapping I am using the following URL

host:port/my_db/mailing_index/_mapping

As you can see no "_all" specified

For searching I am using the following URL
host:port/TestCluster/mailing_index/_search

The argument for sort operation contains just a Boolean condition(with
query string), limits and sorting. No "_all" specified.

I've checked the structure of index using get mapping API, everything
is OK (as I specified in argument for mapping).

So the issue still exists.

Best regards,
H.Avetisyan

On Aug 17, 4:42 pm, Shay Banon kim...@gmail.com wrote:

Two things: How do you search for the value? Do you search against the
specific field? By default, it is added to the _all field (and its the
default field being searched on). You can disable it from being added to
the
_all field as well. Also, make sure the mapping you set is actually the
mapping you identified by elasticsearch, use the get mapping API to check
it
out.

On Wed, Aug 17, 2011 at 12:47 PM, hamazasp.avetisyan <

hamazasp.avetis...@gmail.com> wrote:

Hi,
I'm using dynamic mapping for indexing. Above you can see PHP
structure of data.

array("mailing_index" =>
array("properties" =>
array(
"f_id" =>
array("type" => "long"),
"f_from" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_subject" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_body" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_reply_to" =>
array("type" => "string",
"index" => "no"),
"f_type" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_status" =>
array("type" => "integer",
"index" => "no"),
"f_datetime" =>
array("type" => "long",
"index" => "not_analyzed"),
"f_userid" =>
array("type" => "long",
"index" => "not_analyzed"),
)
)
)

As you can see "f_reply_to" field marked as "index" => "no". But I am
able to perform search by this field. In documentation of elastic
search we can find a line " "index:no" means that it won’t be
searchable at all". Used the 0.17.6 version of elasticsearch. Same
behavior for 0.17.0.

Maybe I'm doing something wrong, please help me to understand the
situation.

//////////////////////// config file
content //////////////////////////////////
node :
data : true
gateway :
type : fs
index :
analysis :
analyzer :
default :
type : custom
tokenizer : standard
filter : [standard, lowercase, porterStem, stop]

network.publish_host: 127.0.0.1
network.bind_host: 127.0.0.1
network.host: 127.0.0.1

node.data: true # Default

http.port: 9200 # Default

cluster.name: "TestCluster"

//////////////////////// end of config file
content ////////////////////////////////

Thanks in advance
H. Avetsyan

Then you are searching by default on the _all field, clinton pointed out
that when setting index : "no", it still gets included in _all.

On Mon, Aug 22, 2011 at 9:02 AM, hamazasp.avetisyan <
hamazasp.avetisyan@gmail.com> wrote:

Hi Shay!

Below you can see the flow that I am passing through.

curl -XDELETE 'http://localhost:9200/test'

curl -XPUT 'http://localhost:9200/test'

curl -XPUT "http://localhost:9200/test/type1/_mapping" -d '{ "type1" :
{ "properties" : { "field1" : {"type" : "string", "index" : "no"},
"field2" : {"type" : "string", "index" : "analyzed"} } } }'

curl -XPUT 'http://localhost:9200/test/type1/1' -d '{ field1: "edo1",
field2: "aaa" }'
curl -XPUT 'http://localhost:9200/test/type1/2' -d '{ field1: "edo2",
field2: "bbb" }'
curl -XPUT 'http://localhost:9200/test/type1/3' -d '{ field1: "edo3",
field2: "ccc" }'

curl -XGET 127.0.0.1:9200/test/_search -d '{"query":{"query_string":
{"query":"edo1"}}}'

The last search line returns the first document, but it has type
"filed1" that created as "index":"no". This is the actual problem.

On Aug 18, 5:09 pm, Shay Banon kim...@gmail.com wrote:

What I meant is what type of query do you execute when you say it does
not
work?

On Thu, Aug 18, 2011 at 11:20 AM, hamazasp.avetisyan <

hamazasp.avetis...@gmail.com> wrote:

Hi, thank you for reply!

For mapping I am using the following URL

host:port/my_db/mailing_index/_mapping

As you can see no "_all" specified

For searching I am using the following URL
host:port/TestCluster/mailing_index/_search

The argument for sort operation contains just a Boolean condition(with
query string), limits and sorting. No "_all" specified.

I've checked the structure of index using get mapping API, everything
is OK (as I specified in argument for mapping).

So the issue still exists.

Best regards,
H.Avetisyan

On Aug 17, 4:42 pm, Shay Banon kim...@gmail.com wrote:

Two things: How do you search for the value? Do you search against
the
specific field? By default, it is added to the _all field (and its
the
default field being searched on). You can disable it from being added
to
the
_all field as well. Also, make sure the mapping you set is actually
the
mapping you identified by elasticsearch, use the get mapping API to
check
it
out.

On Wed, Aug 17, 2011 at 12:47 PM, hamazasp.avetisyan <

hamazasp.avetis...@gmail.com> wrote:

Hi,
I'm using dynamic mapping for indexing. Above you can see PHP
structure of data.

array("mailing_index" =>
array("properties" =>
array(
"f_id" =>
array("type" => "long"),
"f_from" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_subject" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_body" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_reply_to" =>
array("type" => "string",
"index" => "no"),
"f_type" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_status" =>
array("type" => "integer",
"index" => "no"),
"f_datetime" =>
array("type" => "long",
"index" => "not_analyzed"),
"f_userid" =>
array("type" => "long",
"index" => "not_analyzed"),
)
)
)

As you can see "f_reply_to" field marked as "index" => "no". But I
am
able to perform search by this field. In documentation of elastic
search we can find a line " "index:no" means that it won’t be
searchable at all". Used the 0.17.6 version of elasticsearch. Same
behavior for 0.17.0.

Maybe I'm doing something wrong, please help me to understand the
situation.

//////////////////////// config file
content //////////////////////////////////
node :
data : true
gateway :
type : fs
index :
analysis :
analyzer :
default :
type : custom
tokenizer : standard
filter : [standard, lowercase, porterStem, stop]

network.publish_host: 127.0.0.1
network.bind_host: 127.0.0.1
network.host: 127.0.0.1

node.data: true # Default

http.port: 9200 # Default

cluster.name: "TestCluster"

//////////////////////// end of config file
content ////////////////////////////////

Thanks in advance
H. Avetsyan

Thank you !! It works !!

On Aug 22, 12:46 pm, Shay Banon kim...@gmail.com wrote:

Then you are searching by default on the _all field, clinton pointed out
that when setting index : "no", it still gets included in _all.

On Mon, Aug 22, 2011 at 9:02 AM, hamazasp.avetisyan <

hamazasp.avetis...@gmail.com> wrote:

Hi Shay!

Below you can see the flow that I am passing through.

curl -XDELETE 'http://localhost:9200/test'

curl -XPUT 'http://localhost:9200/test'

curl -XPUT "http://localhost:9200/test/type1/_mapping" -d '{ "type1" :
{ "properties" : { "field1" : {"type" : "string", "index" : "no"},
"field2" : {"type" : "string", "index" : "analyzed"} } } }'

curl -XPUT 'http://localhost:9200/test/type1/1'-d '{ field1: "edo1",
field2: "aaa" }'
curl -XPUT 'http://localhost:9200/test/type1/2'-d '{ field1: "edo2",
field2: "bbb" }'
curl -XPUT 'http://localhost:9200/test/type1/3'-d '{ field1: "edo3",
field2: "ccc" }'

curl -XGET 127.0.0.1:9200/test/_search -d '{"query":{"query_string":
{"query":"edo1"}}}'

The last search line returns the first document, but it has type
"filed1" that created as "index":"no". This is the actual problem.

On Aug 18, 5:09 pm, Shay Banon kim...@gmail.com wrote:

What I meant is what type of query do you execute when you say it does
not
work?

On Thu, Aug 18, 2011 at 11:20 AM, hamazasp.avetisyan <

hamazasp.avetis...@gmail.com> wrote:

Hi, thank you for reply!

For mapping I am using the following URL

host:port/my_db/mailing_index/_mapping

As you can see no "_all" specified

For searching I am using the following URL
host:port/TestCluster/mailing_index/_search

The argument for sort operation contains just a Boolean condition(with
query string), limits and sorting. No "_all" specified.

I've checked the structure of index using get mapping API, everything
is OK (as I specified in argument for mapping).

So the issue still exists.

Best regards,
H.Avetisyan

On Aug 17, 4:42 pm, Shay Banon kim...@gmail.com wrote:

Two things: How do you search for the value? Do you search against
the
specific field? By default, it is added to the _all field (and its
the
default field being searched on). You can disable it from being added
to
the
_all field as well. Also, make sure the mapping you set is actually
the
mapping you identified by elasticsearch, use the get mapping API to
check
it
out.

On Wed, Aug 17, 2011 at 12:47 PM, hamazasp.avetisyan <

hamazasp.avetis...@gmail.com> wrote:

Hi,
I'm using dynamic mapping for indexing. Above you can see PHP
structure of data.

array("mailing_index" =>
array("properties" =>
array(
"f_id" =>
array("type" => "long"),
"f_from" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_subject" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_body" =>
array("type" => "string",
"index" => "analyzed", "analyzer" => "default"),
"f_reply_to" =>
array("type" => "string",
"index" => "no"),
"f_type" =>
array("type" => "string",
"index" => "not_analyzed"),
"f_status" =>
array("type" => "integer",
"index" => "no"),
"f_datetime" =>
array("type" => "long",
"index" => "not_analyzed"),
"f_userid" =>
array("type" => "long",
"index" => "not_analyzed"),
)
)
)

As you can see "f_reply_to" field marked as "index" => "no". But I
am
able to perform search by this field. In documentation of elastic
search we can find a line " "index:no" means that it won’t be
searchable at all". Used the 0.17.6 version of elasticsearch. Same
behavior for 0.17.0.

Maybe I'm doing something wrong, please help me to understand the
situation.

//////////////////////// config file
content //////////////////////////////////
node :
data : true
gateway :
type : fs
index :
analysis :
analyzer :
default :
type : custom
tokenizer : standard
filter : [standard, lowercase, porterStem, stop]

network.publish_host: 127.0.0.1
network.bind_host: 127.0.0.1
network.host: 127.0.0.1

node.data: true # Default

http.port: 9200 # Default

cluster.name: "TestCluster"

//////////////////////// end of config file
content ////////////////////////////////

Thanks in advance
H. Avetsyan