I ran into an issue and decided to experiment with having multiple
indexes in one table--that I could use with thinking sphinx. When
doing generic searches, I don't want case sensitivity to be an issue.
I also want to be able to do partial searches, using asterisks.
However, I also want to do case-sensitive searches against the full,
literal value of a column. So, "AbCD*" would only match a search of
"AbCD*" and not "AbCD" or "AbC*", etc.
Inside my model, if I do two define_index 's, It creates two sources
(as seen below in my pastie). However, it only creates one
index ..._core. So if I set any conflicting property values in the
define indexes, it will only use one of them.
In addition, if the two define_index 's do not have the same number of
records / attributes / etc, Sphinx will error out when trying to index
them due to a mismatch. Soo... I half fixed the issue below, by semi-
customizing that section in the sphinx.conf. See here:
http://pastie.org/479699
I had to create two "index ..._core_XX" entries and told the index to
point at both. This lets me have two sets of files with a different
number of attributes and different properties.
One issue, however is now this:
>> GeneralResource.search :conditions => {:profile_name_lit => "TSTCERT.xfgyhd"}, :limit => 1
=> [nil]
This doesn't happen with every value. I'm still doing some testing to
see why (exactly) it will behave like this.
But... I think supporting this would be a very worthwhile change to
Thinking Sphinx.