Solr search returns 0 results if search phrase is in double quotes

sI have one search result that looks like this:
Outlook Out of Office Assistant
Jul, 28, 2014 - To activate the Out of Office Assistant: On the Tools menu click Out of Office Assistant. In the Out of Office Assistant dialog box select the Send Out of Office auto-replies radio button. If you want to specify a set time and date range select the Only send during this time range check box. Then set the Start time and then set the...
When I do this search, I get 10 results back including the one above.
<cfsearch
name="qTechTips"
collection="#collection#"
criteria='secondary_id_i:24 out of office'
orderby="sort_date_s desc"
/>
But when I do a phrase search for "Out of Office":
<cfsearch
name="qTechTips"
collection="#collection#"
criteria='secondary_id_i:24 "out of office"'
orderby="sort_date_s desc"
/>
or
<cfsearch
name="qTechTips"
collection="#collection#"
criteria='secondary_id_i:24 "Out of Office"'
orderby="sort_date_s desc"
/>
I get 0 results. What am I doing wrong? I would like to do a phrase match to what is in the body, not the "title".
I am on ColdFusion 11, update 3

Escaping the quotes didn't help .I already read the solr search examples by Adobe but that didn't help me much. I don't know if this is documented in the CF documentation anywhere (I couldn't find it). What I worked for me after looking at the Apache Solr documentation was that you need to add "+" in between the words in the phrase:
<cfsearch
name="qTechTips"
collection="#collection#"
criteria='secondary_id_i:24 "Out+of+Office"'
orderby="sort_date_s desc"
/>
Expecting my users to enter "+" is a bit much but I know they can handle putting double quotes about phrases they want an exact match for. After some googling, this is my solution for automatically adding the "+" between the exact phrase for cfsearch processing (if you have a better solution, please let me know) :
  <!--- ////START: solr search --->
  <cfset solr_criteria = "">
  <!--- //START:Process the user's input if they use exact phrase search (in double quotes). I change their keyword input so it is cfsearch friendly. If a user enters 'how to set "Out of Office" and "Web Access"', we clean it up so it is 'how to set  "Out+of+Office" and "Web+Access"' for the cfsearch--->
  <!--- I don't know if there is a better way to do this, but this is what I came up with. --->
  <cfset txt_keyword_solr = #txt_keyword#>
  <cfif find('"',txt_keyword_solr)>
    <cfset stringphrase = reMatch('"([^"]*)"',txt_keyword_solr)>
    <!--- <cfdump var="#stringphrase#" label="Example REMatch"> --->
    <cfloop array="#stringphrase#" index="i">
      <cfset txt_keyword_solr = #ReplaceNoCase(txt_keyword_solr,i,rereplace(i, " ","+","all"),"all")#>     
    </cfloop>
  </cfif>
  <cfif LEN(TRIM(txt_keyword_solr)) GT 0>
    <cfset solr_criteria = solr_criteria & ' ( #Trim(preservesinglequotes(txt_keyword_solr))# ) '>
  </cfif>
  <!--- //END:Process the user's input if they use exact phrase search (in double quotes). --->
  <cfsearch
name="qTechTips"
collection="#collection#"
criteria="#solr_criteria#"
orderby="sort_date_s desc"
/>
  <p><cfoutput>#solr_criteria#</cfoutput></p>
  <!--- ////END: solr search --->

Similar Messages

  • Text search returns results with some keywords, but not others

    This pertains to a tours website for Turkey. I've sucessfully
    set up a search form, and results page which returns results when
    multiple keywords are entered. Everything is working well, except
    when certain keywords are used. For example, the table column being
    searched for is called long_itinerary, so if anyone is interested
    in a certain site or city, it's bound to be in the long itinerary
    somewhere.
    Here's the problem, by example: When someone searches with
    the keywords Antalya, Konya, Ankara, or Adana, for example, results
    are returned from the database, and those keywords are in each
    returned tour's long itinerary.
    But certain keywords return nothing, even when they're in
    practically all of the tours, in the long_itinerary column. For
    example, Istanbul, Ephesus, and Izmir, Kusadasi and Pergamum return
    no results, even though they're there. I've gone through all of the
    most likely keywords, and these are the offenders. If, for example,
    I search with "Istanbul Ankara," I get results with tours including
    Ankara (and Istanbul, but only because the word "Ankara" is in the
    itinerary).
    First I made sure the Charset values were the same on the
    search form page and the results page. Still had the problem. Next,
    I went into the database itself, and copied the word "Istanbul"
    directly from the long_itinerary column of the database, and pasted
    it into the search function's text field, and searched again. Same
    problem--no results returned.
    I can't see any difference between the keywords which work
    correctly, and those which don't, what baffles me is that even when
    I copy a keyword directly from the database and paste it in the
    search text field, it returns no results!
    Well, I'm baffled! Any ideas what might cause this?

    Hmm -- one of my customers is a turkish building company
    (Kusadasi BTW), and when *they* add some contents to the DB,
    they´ll be entering turkish chars. It´s in particular the
    turkish "I" which is pretty different, and this is when a search
    for keywords containing a western "I" will fail.
    Could that be the problem in your case ?

  • FAST ESP Search returning error while search

    hi
    We have a FAST ESP 5.3 installed on one of our servers that crawls our intranet site and internet public facing site on our acceptance environment.
    When we try to search for a product, it returns an error message as below
    Error
    We apologize, the page you are trying to access is currently unavailable. A notification has been sent to our technical team.
    Press the back button to return to the previous screen.
    Can anyone point me to the right direction in analyzing and resolving the issue.
    Thanks
    Ram

    The error is somehow generic with access issues. In order to determine if the problem is within ESP, you will need to review the logs (may be gather an infotool ouput). Also a good test would be trying to run some queries directly from the qrsrver(http://localhost:15100)
    on the server where qrserver runs.

  • SharePoint Foundation 2010 Search returns no results

    Hi,
    SharePoint foundation 2010 Search is not showing any results after configuring the step from the below link.
    http://wiki.sirkit.ca/2011/04/sharepoint-foundation-2010-search-returns-no-results/
    My Server Setup : 
    SharePoint Foundation 2010
    SQL Server 2008 r2
    We have created two web application and configured the search service as above mention link.
    And we have migrated a site from MOSS 2007 to SharePoint 2010 to one of  web application,we assigned search database to the newly migrated content database.
    Previously there was Form based Authentication was done on Moss 2007 site and on SP 2010 we are working on Windows authentication.
    Database showing crawl is working and showing success results as well in SQL table, Its only Not able to show the results on the page.
    Thanks in Advance
    Dinesh
    Regards, Dinesh Reddy.

    Don't look at the databases, it's a bad habit to get into and will lead to confusion.
    In search administration are you getting any sucsess messages in the crawl history and is the number of items in your index non-zero?
    If so that implies that the crawl process is working and it's the user security that's the issue.
    To confirm try searching for a file whilst logged in as the crawl account, that should return results.

  • When I click on a result of a Google search and then go that web site, the Back button on the toolbar is grayed out and I cannot return to the search results.

    When using FF3.6 and making a Google search, when I click on a result and then go that web site, the Back button on the toolbar is grayed out and I cannot return to the search results without going to History. This does not happen all the time; about 1/2 of the time.
    This problem is not limited to Google, but occurs with other sites as well.

    If you are talking about searches from - http://www.google.com/ - are you logged into a Google account all the time? If so, check your "Search Settings" from the "gear" in the upper-right corner of that Google search page and see if you have '''Open search results in a new browser window.''' check-marked, at the bottom of that preferences page. When that is check-marked and you have Tab options in Firefox set to '''Open new windows in a new tab instead''', you will get search results always opening in a new tab instead of the same tab. As to why that works different for "sponsored links" I don't know, I haven't seen the "sponsored links" for years now, I have a GM script that blocks those advertisements.

  • Windows 8.1 x64 Smart Search Outlook and OneNote 2013(x32) not returning results

    Is the 8.1 Smart Search([windows-key]-type)  supposed to return results from Outlook and/or OneNote?
    I am using Exchange Cached mode for Outlook if that matters.
    I have done the following to try and get results to show up:
    control panel...Indexing Options...Advanced...File Types...Index Properties and File Contents
    used indexing troubleshooter which found no problems
    control panel...Indexing Options...Advanced...Rebuild...
    used scanpst to scan my ost and make repairs.
    checked and unchecked Outlook and OneNote within index properties
    tried to go to C:\Users\[username]\AppData\Local\Microsoft\Outlook\username.ost properties...advanced...checked allow this file to have contents indexed. Except the next time i start outlook the check mark goes away.
    verified .pst , .ost and .pst files are all in the index service...file types... list
    Search within Outlook itself works just fine and quickly, but i would like to be able to search from the "Smart Search".  File name search is flawless. 
    If it isn't supported, why is it in the indexing options that clearly work for smart search settings because I also added a location for searching where file names search works just fine(although it does seem the contents of excel/word files are
    not being indexed, but the index might still be rebuilding)
    Any help would keep some hair on my head. 
    Thanks

    Hi,
    It seems that the smart search can't search the content in outlook and OneNote.
    blogs.technet.com/b/daanish/archive/2014/03/19/windows-8-101-smart-search.aspx
    The reason why Outlook and OneNote appears in the Index option tab is that Outlook and OneNote need the Windows search to help index the content in Outlook and OneNote, if we remote the outlook and onenote from Index Option tab, the search function in the
    Outlook and OneNote may not works.
    Also, smart search main focus on Settings , files, web Images, web Videos which we can select above the search box.  Another reason we suspect the design for this is the consideration for security, if we can search the emails in the smart search, that
    maybe some programs can access the content in Outlook and OneNote without authentication .
    Hope the information above help.
    Best Regards,
    Jason Zeng

  • 'People Search Core Result' web part with 'office' filter in Keyword Query is not returning results

    I have created a page with "People search core result" web part on SharePoint 2010.
    When I try to use the setting (A) or (C) as shown below, there is no results been returned but when set to setting (B), there are results been returned.
    In the returned results I can see the OfficeNumber field is been populated with values and some of them is "UK Finance".
    Setting (A)
    Result Query Options
    -- Fixed Keyword Query = contentclass:spspeople -- Append Text To Query = Department:"Finance" AND OfficeNumber:"UK Finance"
    Setting (B)
    Result Query Options
    --- Fixed Keyword Query = contentclass:spspeople --- Append Text To Query = Department:"Finance"
    Setting (C)
    Result Query Options
    --- Fixed Keyword Query = contentclass:spspeople --- Append Text To Query = OfficeNumber:"UK Finance"
    What am I doing wrong here? Am I missing something? Do I need any additional configuration in order to get this to work?
    I hope someone could help me or point me to the right direction.
    Thank you
    muges

    You might want to check the Manage User Properties area of the User Profile Service in Central Admin.
    Any properties you query on should be marked "Indexed" or "Use in Scopes".  You can also check that you are using the correct internal name for these properties.

  • Fuzzy search not returning results?

    I'm executing a phonetic search on the nm_resource column. my application allows a call center employee to search on the resource name (nm_resource), if the resource is not found then they will enter a new one. The problem is someone may have already entered the resource name but spelled it incorrectly resulting in duplicate records for the same resource name. To enable the call center to retrieve records that may have the same sound but are spelled differently we have implemented the fuzzy search capability of Oracle text. Things have been going very nicely for the most part with the exception of this one issue we're trying to understand.
    Using the query below we're searching for the resource name "rosies" the actual record in the database was entered as "rosy's". the search returns (rosies,rosie's,rosys) and does not return ---> rosy's <--- the record i'm interested in
    it is reasonable to expect rosy's to be returned in the result set? my query should retunn the max fuzzy expansions and all fuzzy scores.
    select score(1), nm_resource, ADDR_RSRC_ST_LN_1, id_resource, ADDR_RSRC_CITY FROM caps_resource where
    CONTAINS (nm_resource,'fuzzy(rosies, 0, 5000, weight)',1)>0
    union
    select /*+index(caps_resource ind_caps_resource_8)*/ 10, nm_resource, ADDR_RSRC_ST_LN_1, id_resource, ADDR_RSRC_CITY from caps_resource 
    where NM_RESOURCE_UPPER like upper(replace(replace('%' || 'rosies' || '%',' '), '-'))
    and rownum<500 order by 1 DESC;
    any help explaining this is much appriciated.
    Regards,

    When you index "Rosy's", by default it sees the apostropohe as a delimiter and tokenizes and indexes "Rosy" and "s" separately. So, you could only find it by searching the singular form or the singular form obtained by using stemming. However, if you set the apostrophoe as a skipjoin, then it tokenizes and indexes "Rosys" as one token that you can then search for that using "rosies":. Please see the demonstration below. You might also be interested in soundex, which can be used with Oracle Text, or the functions in the utl_match package or metaphone.
    SCOTT@orcl_11g> CREATE TABLE caps_resource
      2    (nm_resource  VARCHAR2 (30))
      3  /
    Table created.
    SCOTT@orcl_11g> INSERT ALL
      2  INTO caps_resource VALUES ('Rosy''s')
      3  SELECT * FROM DUAL
      4  /
    1 row created.
    SCOTT@orcl_11g> SELECT * FROM caps_resource
      2  /
    NM_RESOURCE
    Rosy's
    SCOTT@orcl_11g> CREATE INDEX your_text_idx ON caps_resource (nm_resource)
      2  INDEXTYPE IS CTXSYS.CONTEXT
      3  PARAMETERS
      4       ('STOPLIST CTXSYS.EMPTY_STOPLIST')
      5  /
    Index created.
    SCOTT@orcl_11g> SELECT token_text FROM dr$your_text_idx$i
      2  /
    TOKEN_TEXT
    ROSY
    S
    SCOTT@orcl_11g> SELECT * FROM caps_resource
      2  WHERE  CONTAINS (nm_resource, 'FUZZY (rosies, 0, 5000, weight)') > 0
      3  /
    no rows selected
    SCOTT@orcl_11g> DROP INDEX your_text_idx
      2  /
    Index dropped.
    SCOTT@orcl_11g> BEGIN
      2    CTX_DDL.CREATE_PREFERENCE ('your_lexer', 'BASIC_LEXER');
      3    CTX_DDL.SET_ATTRIBUTE ('your_lexer', 'SKIPJOINS', '''');
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11g> CREATE INDEX your_text_idx ON caps_resource (nm_resource)
      2  INDEXTYPE IS CTXSYS.CONTEXT
      3  PARAMETERS
      4    ('STOPLIST CTXSYS.EMPTY_STOPLIST
      5        LEXER       your_lexer')
      6  /
    Index created.
    SCOTT@orcl_11g> SELECT token_text FROM dr$your_text_idx$i
      2  /
    TOKEN_TEXT
    ROSYS
    SCOTT@orcl_11g> SELECT * FROM caps_resource
      2  WHERE  CONTAINS (nm_resource, 'FUZZY (rosies, 0, 5000, weight)') > 0
      3  /
    NM_RESOURCE
    Rosy's
    SCOTT@orcl_11g>

  • I have one problem and I think it is a settings issue. When I google the web I get results. Now, when I visit some website and I return to my search results I don't have any markers (diffrent link colour for visited sites in IE).

    Question
    I have one problem and I think it is a settings issue. When I google the web I get results. Now, I visited some website and then I want to return to my search results and pick another search result. And there is a problem: I don't have any markers (diffrent link colour for visited sites in IE) that would help me to distinguish visited and not visited sites.

    Why start a new and very similar thread to your other one which you have not responded to (have you read the replies?)
    I suggest that no response is made to this duplicate thread. 

  • Search for "A word or phrase in the file" in .trc files gives no result

    Hi
    When i Search through Explorer using search for "A word or phrase in the file" in .trc files I get no result.
    Probably because these files are of type "Microsoft Network Monitor Document".
    But I can open them using Notepad, so why can't I search for a word in these files?
    I there another way to search?
    Normally I ofcourse use Visual Admin. but there are a lot of trace files so it would be nice to do this kind of search
    br Peter

    Hi Peter,
    This is a known problem, see http://support.microsoft.com/kb/309173
    An alternative is to use other tools which search even faster than the slow MS search does.
    Hope it helps
    Detlev

  • Mail search don't return results in chronological order

    This change completely voids my ability to find an email using my IPad.   I need to be able to sort by newest to oldest.   Lots of threads on this it just needs to be fixed!  Good thing I still have my Android phone.

    Strange, my Mail search does return results in chronological order.

  • Podcast returns "Your search returned no results" but that wasn't the case yesterday

    Hello Everyone:
    I've been a loyal listener to the 66/40 podcast. It's gone thru some name changes (now it's "66/40 on Oneplace.com") and when I did a search in AppleTV yesterday & today, I got a "Your search returned no results", even though it displays when I search for "66". For weeks now, I've been able to access it. I can access it via the iTunes Store, but no longer on AppleTV. Anyone know why? Any help would be greatly appreeshed.
    Thanks.

    Same thing happening to me, multiple podcasts, video and audio.

  • Podcasts "Your search returned no results"

    When doing a search under Podcasts in Apple TV (2nd gen), a list show up on the right hand side, but when I click on ANY podcast name, it says "Your search returned no results"
    As the producer of one of the podcasts in question, I'm not sure why this is happening. They all show up on my Apple TV 1st Gen, as well as iTunes on my Mac, mobile devices, etc. but NO podcasts that I search for can be accessed in 2nd Gen.
    Thanks

    Same thing happening to me, multiple podcasts, video and audio.

  • Search returned no results

    Hi Experts,
    I had configured backend BW 3.5 connection in the EHP1 for CE 7.1. When I opened VC, I can find the BW system name I configured. I am using dedicated application server configuration. However, when I try to search for query or infoset, it showed "search returned no results". The connection test in system landscape was sucessful. What may be the root cause? Do I need to install any support package in BW 3.5 in order to be searched by VC?
    Best Regards
    Tom

    This message has been opened a long time. Please re post if you have not solved the issue.

  • Non-local searches return "null" results

    I'm creating a Merged help output using AIR Browser Based Help. Said output currently has one major flaw: null search results when viewed over a network.
    Now, I have read through the thread on this forum about people who initially got a "null" search result when searching a local project, but with the search subsequently working, and indeed that behavior is what I was initially seeing. That is, on my local copy of the project, my first search would return "null," and then things would work normally. However, when other users accessed my local project over our network, they never got anything other than "null" results. (Quick aside for relevant information: output was from 64-bit RH9, testing is on FIrefox 13 and I.E. 9) If I move my local copy onto the network, I am no longer successful in searching.
    I have performed the suggested fix on the whfhost.js file, and while it fixed the problem locally-- I no longer see "null" results-- the problem persists for non-local access. Does anyone have any suggestions on how to fix this?
    Thanks!

    For the benefit of anyone else, this is the solution that was provided by Adobe.
    Open the generated output folder and open whfhost.js file in the notepad application. Search for the following strings in the file. you need to replace this function
    function Query()
      gbAIRSearchString  = goOdinHunter.strQuery;
    g_CurPage = 1;
    context = new HuginContext();
      context.reset();
    context.push( goOdinHunter.query, goOdinHunter,
      processHunterResult, null );
      context.resume();
    With this new function
    function isValidType(obj)
    return ( (typeof(obj)!='undefined')&&(obj!=null) );
    function Query()
      gbAIRSearchString  = goOdinHunter.strQuery;
    g_CurPage = 1;
    if (isValidType(context) && isValidType(context.aTasks))
      while(context.aTasks.length>0)
      context.resume();
    context = new HuginContext();
      context.reset();
    context.push( goOdinHunter.query, goOdinHunter,
      processHunterResult, null );
      context.resume();
    And try running the output and see if you stilll face the null search result problem
    If this problem is fixed, then you can go to the C:\Program Files\Adobe\Adobe RoboHelp 8\RoboHTML\WebHelp5Ext\template_stock folder location, and make the similar changes in the whfhost.js file located in this folder.
    It has worked for others so I would first check carefully that you have made the modification correctly.
    If you reverse the change, are you back to square one and get a null result first time?
    The modification was for RoboHelp 8 or 9. You haven't said what version you are using.
    Does it fail with all browsers?
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

Maybe you are looking for