Re: A search with special characters in Solr
You might have them tag like this ~word~, then parse for that when building your search. Not sure what you mean by parsing for it? When I use a word like this in my data (with tildes around it), and then search for it (including the tildes), I get no results back from Solr. It does match on just word with no tildes, but that's not what I'm looking for, they don't want to return every instance of just the word, but some way to mark it as a unique version of that word to find. I'm thinking maybe I can take the special characters and convert them to a text string of some kind? It'd be kind of awkward, but not sure how else to do it. --- Mary Jo ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338984 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: A search with special characters in Solr
I'm confused - why not just add a form field to their content editor where they can enter the tags there? On Mon, Nov 8, 2010 at 11:08 AM, Mary Jo Sminkey mary...@cfwebstore.com wrote: I have an unusual request from my client, they want to be able to have their people in the field put tags in their reports that they can search on, using some kind of special character to tag a word as being one of these special search phrases. They wanted to use asterisks to do this (such as ***HIGHLIGHT ) but obviously that won't work. I'm wondering if there's any other kind of character I could let them use that Solr would pick up as part of the work and index, but so far my tests have not resulted in much success. --- Mary Jo ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338985 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: A search with special characters in Solr
I'm confused - why not just add a form field to their content editor where they can enter the tags there? Unfortunately, we have no access to that system, I can only pull the data that has been entered into it. --- Mary Jo ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338987 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: A search with special characters in Solr
Ok - so then if you use tildes like Muareen suggested, you can parse for them when you index the data. Do you have control over the code that does the indexing? On Tue, Nov 9, 2010 at 9:27 AM, Mary Jo Sminkey mary...@cfwebstore.com wrote: I'm confused - why not just add a form field to their content editor where they can enter the tags there? Unfortunately, we have no access to that system, I can only pull the data that has been entered into it. --- Mary Jo ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338988 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: A search with special characters in Solr
What I mean by parsing is that you use the tildes to determine what to search for by extracting what is between them and using that to build your search. On Tue, Nov 9, 2010 at 6:55 AM, Mary Jo Sminkey mary...@cfwebstore.com wrote: You might have them tag like this ~word~, then parse for that when building your search. Not sure what you mean by parsing for it? When I use a word like this in my data (with tildes around it), and then search for it (including the tildes), I get no results back from Solr. It does match on just word with no tildes, but that's not what I'm looking for, they don't want to return every instance of just the word, but some way to mark it as a unique version of that word to find. I'm thinking maybe I can take the special characters and convert them to a text string of some kind? It'd be kind of awkward, but not sure how else to do i ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338989 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: A search with special characters in Solr
Ok - so then if you use tildes like Muareen suggested, you can parse for them when you index the data. Do you have control over the code that does the indexing? Yes, I'm pulling all the data and then indexing it to make it available for my client to search, so they can find the specific records in the external system that have had these tags entered into them. So what would I do with the tildes to make Solr find them? Or ideally, my client wants to use asterisks (***HIGHLIGHT) they already sent an email out with the list of tags to their users before checking with me if that would be okay, so if I can make that work, they'd be really happy. --- Mary Jo ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338998 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: A search with special characters in Solr
What I mean by parsing is that you use the tildes to determine what to search for by extracting what is between them and using that to build your search. That's not going to give me what I need, because I need to find *only* the results that use the tildes, not the records that might just have the word by itself. Otherwise, they could just search on the plain word and not bother with special characters at all. --- Mary Jo ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339018 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: A search with special characters in Solr
Right, so parse the text for the ~ words. You can use rematch to get them easily enough. You can then use that list of words as your body when you add it to your index. On Tue, Nov 9, 2010 at 12:27 PM, Mary Jo Sminkey mary...@cfwebstore.com wrote: What I mean by parsing is that you use the tildes to determine what to search for by extracting what is between them and using that to build your search. That's not going to give me what I need, because I need to find *only* the results that use the tildes, not the records that might just have the word by itself. Otherwise, they could just search on the plain word and not bother with special characters at all. --- Mary Jo ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339024 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: A search with special characters in Solr
Right, so parse the text for the ~ words. You can use rematch to get them easily enough. You can then use that list of words as your body when you add it to your index. Well, that would work I guess if they *only* wanted to search for those words, but they want to be able to search on any of the content text as well. So I needed someway to make them unique in the search body. What I decided to do was to just use a Regex to convert the asterisks to X's so that in the search index it becomes XXXHighlight or whatever codes they want to use. Then I do a similar replacement when running the search. That seems to be working. --- Mary Jo ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339025 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
A search with special characters in Solr
I have an unusual request from my client, they want to be able to have their people in the field put tags in their reports that they can search on, using some kind of special character to tag a word as being one of these special search phrases. They wanted to use asterisks to do this (such as ***HIGHLIGHT ) but obviously that won't work. I'm wondering if there's any other kind of character I could let them use that Solr would pick up as part of the work and index, but so far my tests have not resulted in much success. --- Mary Jo ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338953 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: A search with special characters in Solr
You might have them tag like this ~word~, then parse for that when building your search. On Mon, Nov 8, 2010 at 9:08 AM, Mary Jo Sminkey mary...@cfwebstore.com wrote: I have an unusual request from my client, they want to be able to have their people in the field put tags in their reports that they can search on, using some kind of special character to tag a word as being one of these special search phrases. They wanted to use asterisks to do this (such as ***HIGHLIGHT ) but obviously that won't work. I'm wondering if there's any other kind of character I could let them use that Solr would pick up as part of the work and index, but so far my tests have not resulted in much success. --- Mary Jo ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338979 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm