You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jack Park <ja...@topicquests.org> on 2013/11/07 18:52:10 UTC
Indexing URLs in Solr?
Figuring out a google query to gain an answer seems difficult given
the ambiguity;
I have a field:
<field name="resourceURL" type="string" indexed="true" stored="true"/>
into which I store a URL
which, when displayed as a result of a query, looks like this in the
admin console:
"resourceURL": "http://someotherserver.org/",
The query "resourceURL:*" will find all of them, but there is this question:
What does the query look like to find that specific URL?
Of course, "resourceURL:http://someotherserver.org/" doesn't work
This one
resourceURL=http%3A%2F%2Fsomeotherserver.org%2F
fails as well.
What am I overlooking?
Many thanks in advance.
Jack
Re: Indexing URLs in Solr?
Posted by Erick Erickson <er...@gmail.com>.
Right, the other thing to be wary of is special characters. It _might_
also have worked to escape the colon since that's a meta-character.
Quoting the string should be fine too....
Best,
Erick
On Thu, Nov 7, 2013 at 1:07 PM, Jack Park <ja...@topicquests.org> wrote:
> Spoke too soon. Hacking rocks!
> Finally landed on this heuristic, and it works:
>
> resourceURL:"http://someotherserver.org/"
>
> On Thu, Nov 7, 2013 at 9:52 AM, Jack Park <ja...@topicquests.org>
> wrote:
> > Figuring out a google query to gain an answer seems difficult given
> > the ambiguity;
> >
> > I have a field:
> >
> > <field name="resourceURL" type="string" indexed="true" stored="true"/>
> >
> > into which I store a URL
> >
> > which, when displayed as a result of a query, looks like this in the
> > admin console:
> >
> > "resourceURL": "http://someotherserver.org/",
> >
> > The query "resourceURL:*" will find all of them, but there is this
> question:
> >
> > What does the query look like to find that specific URL?
> >
> > Of course, "resourceURL:http://someotherserver.org/" doesn't work
> >
> > This one
> > resourceURL=http%3A%2F%2Fsomeotherserver.org%2F
> >
> > fails as well.
> >
> > What am I overlooking?
> >
> > Many thanks in advance.
> > Jack
>
Re: Indexing URLs in Solr?
Posted by Jack Park <ja...@topicquests.org>.
Spoke too soon. Hacking rocks!
Finally landed on this heuristic, and it works:
resourceURL:"http://someotherserver.org/"
On Thu, Nov 7, 2013 at 9:52 AM, Jack Park <ja...@topicquests.org> wrote:
> Figuring out a google query to gain an answer seems difficult given
> the ambiguity;
>
> I have a field:
>
> <field name="resourceURL" type="string" indexed="true" stored="true"/>
>
> into which I store a URL
>
> which, when displayed as a result of a query, looks like this in the
> admin console:
>
> "resourceURL": "http://someotherserver.org/",
>
> The query "resourceURL:*" will find all of them, but there is this question:
>
> What does the query look like to find that specific URL?
>
> Of course, "resourceURL:http://someotherserver.org/" doesn't work
>
> This one
> resourceURL=http%3A%2F%2Fsomeotherserver.org%2F
>
> fails as well.
>
> What am I overlooking?
>
> Many thanks in advance.
> Jack