Skip to main content
19 events
when toggle format what by license comment
Oct 21, 2016 at 14:00 comment added Corey Burnett I replaced the backslashes with the pipe character both when storing and when querying and that fixed the problem!! Thanks so much for all of your help.
Oct 21, 2016 at 13:59 vote accept Corey Burnett
Oct 21, 2016 at 13:39 history edited Dmytro Shevchenko CC BY-SA 3.0
deleted 210 characters in body
Oct 21, 2016 at 13:39 comment added Dmytro Shevchenko @CoreyBurnett you are right, of course. I forgot about that. Well, then i think the best approach will be to sanitize the role names and remove backslashes.
Oct 21, 2016 at 13:32 comment added Corey Burnett @DmytroShevchenko I don't believe that roles have IDs. They are not Sitecore items. The only identifier that I know of for a role is its name.
Oct 21, 2016 at 13:31 history edited Dmytro Shevchenko CC BY-SA 3.0
deleted 267 characters in body
Oct 21, 2016 at 13:12 comment added Dmytro Shevchenko @CoreyBurnett please see my updated answer.
Oct 21, 2016 at 13:11 history edited Dmytro Shevchenko CC BY-SA 3.0
added 460 characters in body
Oct 21, 2016 at 13:05 history edited Dmytro Shevchenko CC BY-SA 3.0
added 460 characters in body
Oct 21, 2016 at 12:45 comment added Chris Sulham This is getting rather meta. I still think the question is fine, because most people who are going to run into this problem will approach it from the perspective of a faulty query. They read this question and the answers, and hopefully realize the problem wasn't the query but rather how they were storing the field. If this site is meant to be a knowledge repository, we want to make it as easy as possible to find the solution to a problem.
Oct 20, 2016 at 19:41 comment added Chris Sulham FWIW I think the question is fine. My answer below is based on a similar problem I had to solve with storing urls in a multi value field in solr. The tokenization was breaking the query for anything with spaces or weird characters in the url. Maybe rephrase the title to "How to I query literal values in Solr?" but that might not come up when someone is searching for how to query spaces, which is probably the most common problem.
Oct 20, 2016 at 19:21 comment added Corey Burnett What kind of separate question should I create? My problem is that when I query Solr with filters that have spaces or slashes in them that it doesn't seem to work properly. I'm not really sure what my new question should be.
Oct 20, 2016 at 17:55 comment added Corey Burnett I changed the field to be untokenized but it still doesn't work.
Oct 20, 2016 at 17:44 history edited Dmytro Shevchenko CC BY-SA 3.0
added 48 characters in body
Oct 20, 2016 at 17:41 comment added Dmytro Shevchenko @CoreyBurnett use indexType="UNTOKENIZED" on the field definition in your custom index configuration.
Oct 20, 2016 at 17:40 comment added Corey Burnett Ok. The strange thing is that all of this worked perfectly in Sitecore v7.5. Now after we have upgraded to v8.1 it no longer works. How do I make my field "not tokenized"?
Oct 20, 2016 at 17:36 comment added Corey Burnett Ok. Then how come my code doesn't work when searching for a role that has a space in it? Do I need to do something to the role names before I add them to the predicate?
Oct 20, 2016 at 17:36 history edited Dmytro Shevchenko CC BY-SA 3.0
added 143 characters in body
Oct 20, 2016 at 17:06 history answered Dmytro Shevchenko CC BY-SA 3.0