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 Steven White <sw...@gmail.com> on 2017/05/25 15:20:54 UTC

Using Solr as if it is "grep"

Hi everyone,

Is there a way to setup Solr so the search commands I send it and the
searches it does is similar to the way "grep" works (i.e.: regex)?  If not,
how close can Solr be setup to mimic "grep"?

Thanks in advanced.

Steve

Re: Using Solr as if it is "grep"

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Can you use Google as grep? Not so much. That's because the use cases
are very different. grep is for linear search through unparsed content
(whitespaces and all) and it primarily find the matched string. There
is no ranking or long range matches.

Solr - similar to Google - is for processed/normalized/contextualized
search of content and returns whole documents (highlighting is nearest
to returning matched segments).

So, if your use case is grep, you are better of with SilverSearcher or
other efficient re-implementations in that domain of text processing.

Regards,
   Alex.
----
http://www.solr-start.com/ - Resources for Solr users, new and experienced


On 25 May 2017 at 11:20, Steven White <sw...@gmail.com> wrote:
> Hi everyone,
>
> Is there a way to setup Solr so the search commands I send it and the
> searches it does is similar to the way "grep" works (i.e.: regex)?  If not,
> how close can Solr be setup to mimic "grep"?
>
> Thanks in advanced.
>
> Steve