2 Exact Same Documents Being Ranked Differently

2014-09-16 Thread Randy Jensen
I'm trying to track down an issue where 2 simple documents I'm testing are 
being ranked quite a bit differently.

For testing purposes, I'm only searching against one field, "keywords". The 
only word in that field for both documents is "jefferson". However, when I 
search for the word "jefferson", one has a score of "0.30685282" and the 
other is "1.4054651". I would expect the documents to have the same score 
and can't figure out why they're different.

Here's my query: https://gist.github.com/randyjensen/49ee07abd48878b06600

I've disabled norms in my mappings and have also checked the explain object 
that's returned with the query, but everything seems to be the same.

Here's a gist of the return 
object: https://gist.github.com/randyjensen/c5e9d40448a7b86fb3c9

Is my query wrong somehow?

-- 
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/79959c65-ef74-4bf7-aee8-920cb907a315%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Need Exact Search on Two Fields

2014-03-23 Thread Randy Jensen
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.