I'm using GutenTag to apply tags to individual pages in a CMS. The Document
model uses TS5 with Real-Time Indexing. I've set up my index thusly:
# in the model
def tags_for_indexing
tag_names.join ' '
end
# in the index
ThinkingSphinx::Index.define :document, :with => :real_time do
scope { Document.where(id: Document.publicly.map{ |d|
[d.id].concat(d.descendants.published.map(&:id)) }.flatten) }
indexes title
indexes teaser
indexes body_html
indexes author_display
indexes tags_for_indexing
has created_at, type: :timestamp
has updated_at, type: :timestamp
end
I've tested the method, and confirm that it outputs a space-delimited string of
words for the tags.
I run rake ts:rt:rebuild and everything seems to go fine. But trying to search
on some of these tag names is not returning the results I am imagining. The
client has insisted on making some of these tags start with an octothorp,
because she is writing about "hashtags" on Twitter. Most tags do not have
punctuation in them. I am able to find other terms, even very obscure ones,
when I don't use punctuation in the tag names.
Does this sound like something that I can fix, or should I advise the client to
lay off the octothorps?
Walter
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/thinking-sphinx/EA71574B-9EBF-484E-A5FA-BF7CD53A10BC%40wdstudio.com.