Directory Name with Spaces having issue while searching



I want to search one term within URL/folders which contains spaces in directory name
e,g Suppose there are urls as,
http://xxx.xxx.com/abc def ghi/xyz.docx
http://xxx.xxx.com/abc xyz pqr/xyztest123.docx
http://xxx.xxx.com/111 222 333/xyz.docx

I want to search "xyz" in url "http://xxx.xxx.com/abc def ghi/xyz.docx" and in url "http://xxx.xxx.com/111 222 333/xyz.docx", I am using as_oq query parameter which will be used by setOrQueryTerms() function.

I am passing "http://xxx.xxx.com/abc def ghi/xyz.docx" and "http://xxx.xxx.com/111 222 333/xyz.docx" as string[] to setOrQueryTerms function for this.

But in result I get values from all three urls mentioned above instead of two which is desired.

I have also tried with as_sitesearch parameter but that just helps to filter out result with only one Url, for mupltiple URL this as_oq ie. setOrQueryTerms works perfectly when I do not have spaces in directory name.

Any help would be appreciated! Thank you!


mbcizmar wrote Aug 11, 2014 at 7:24 PM

Could you provide an example of what this query would like like directly to the GSA?

prajakta123 wrote Aug 11, 2014 at 7:41 PM

I want to search "searchterm" inside specific locations,

Example: I want to search "Allowance" and there are locations like

http://xxx.xxx.com/Folder 1/..
http://xxx.xxx.com/Folder 2/..
http://xxx.xxx.com/Other Folder 1/..

Here I want to search "Allowance" word inside "Folder 1" and "Other Folder 1" only.

mbcizmar wrote Aug 11, 2014 at 8:47 PM

Thanks again. What I'm looking for would be query that you would perform instead directly on the Appliance.

prajakta123 wrote Aug 11, 2014 at 9:10 PM

&as_oq=site:xxx.xxx.xx/Test/Folder 1 site:xxx.xxx.xx/Test/Other Folder 1

Where my Folder 1 get replaced with "Folder+1" and "Other Folder 1" get replaced with "Other+Folder+1" in query due to UrlEncoding.

Hope I am clear this time.