Jay –
I’m not familiar with the document ID format you mention [having a “:” in the 
prefix], but it looks similar to the composite ID routing I’m using.
Document Id format: “a/1!id”

Then I can use a _route_ value of “a/1!” when querying.

Example Doc IDs:
a/1!768456
a/1!563575
b/1!456234
b/1!245698

The document ID prefix “x/1!” tells Solr to spread the documents over ½ of the 
available shards. When querying with the same value for _route_ it will 
retrieve documents only from those shards.
 
Jeremy Branham
jb...@allstate.com

On 3/25/19, 9:13 PM, "Zheng Lin Edwin Yeo" <edwinye...@gmail.com> wrote:

    Hi,
    
    Sorry, didn't see that you have an exclamation mark in your query as well.
    You will need to escape the exclamation mark as well.
    So you can try it with the query _route_=“123\:456\!”
    
    You can refer to the message in the link on which special characters
    requires escaping.
    
https://urldefense.proofpoint.com/v2/url?u=https-3A__stackoverflow.com_questions_21914956_which-2Dspecial-2Dcharacters-2Dneed-2Descaping-2Din-2Da-2Dsolr-2Dquery&d=DwIFaQ&c=gtIjdLs6LnStUpy9cTOW9w&r=0SwsmPELGv6GC1_5JSQ9T7ZPMLljrIkbF_2jBCrKXI0&m=81cWucTr4zf8Cn2FliZ2fYFfqIb_g605mWVAxLxuQCc&s=30JCckpa6ctmrBupqeGhxJ7pPIcicy7VcIoeTEw_vpQ&e=
    
    By the way, which Solr version are you using?
    
    Regards,
    Edwin
    
    On Tue, 26 Mar 2019 at 01:12, Jay Potharaju <jspothar...@gmail.com> wrote:
    
    > That did not work 😕. Any other suggestions
    > My id is 123:456!678
    > Tried running query as _route_=“123\:456!” But didn’t give expected
    > results
    > Thanks
    > Jay
    >
    > > On Mar 24, 2019, at 8:30 PM, Zheng Lin Edwin Yeo <edwinye...@gmail.com>
    > wrote:
    > >
    > > Hi,
    > >
    > > The character ":" is a special character, so it requires escaping during
    > > the search.
    > > You can try to search with query _route_="a\:b!".
    > >
    > > Regards,
    > > Edwin
    > >
    > >> On Mon, 25 Mar 2019 at 07:59, Jay Potharaju <jspothar...@gmail.com>
    > wrote:
    > >>
    > >> Hi,
    > >> My document id has a format of a:b!c, when I query _route_="a:b!" it
    > does
    > >> not return any values. Any suggestions?
    > >>
    > >> Thanks
    > >> Jay Potharaju
    > >>
    >
    

Reply via email to