I need to be able to do an exact search against two fields, Program Heading 
and Subheading each with it's own search term.

For example, I might need to search for Health Professions -> Medical. So 
the Program Area field would be "Health Professions" and the Subheading 
field would be "Medical". Again, I need exact searched, so "Medical 
Marketing" wouldn't come back as a Subheading if "Medical" is searched for 
or if Medical appears as a subheading under another Program Area.

I've tried every variation of every query I can think of and can't get it 
exactly right. I have the mapping below:

'properties' => array(
      'program_area' => array(
        'type' => 'multi_field',
        'fields' => array(
          'program_area' => array(
            'type' => 'string',
            'index' => 'analyzed'
          ),
          'program_area_raw' => array(
            'type' => 'string',
            'index' => 'not_analyzed',
            'store' => true
          )
        )
      ),
      'subheading' => array(
        'type' => 'multi_field',
        'fields' => array(
          'subheading' => array(
            'type' => 'string',
            'index' => 'analyzed',
            'store' => true
          ),
          'subheading_raw' => array(
            'type' => 'string',
            'index' => 'not_analyzed',
            'store' => true
          )
        )
      ),
)

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/705e6394-1edc-4236-bbf1-a4f6b22f0eb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to