I guess, I finally found the answer here:

http://codegouge.blogspot.com/2014/01/modifying-solr-queryparser.html

"
If you're doing development in Solr trunk and want to adjust the
QueryParser, take a look at the JavaCC grammar file
<https://javacc.java.net/doc/javaccgrm.html> at
lucene/solr/core/src/java/org/apache/solr/parser/QueryParser.jj.  This
isn't a tutorial about JavaCC - there are plenty of those out there
<http://cs.lmu.edu/%7Eray/notes/javacc/>.

Once your changes are complete, you'll need to generate the underlying
classes again.  ant builds from lucene/ or lucene/solr/ don't accomplish
this.  So to do this, run 'ant javacc' from lucene/solr/core/.

That's it.
"

On Mon, Jul 24, 2017 at 7:31 AM, Nawab Zada Asad Iqbal <khi...@gmail.com>
wrote:

> [Subject changed for reposting]
>
> Good morning,
>
> If I want to change something in the lucene-solr/solr/core/src/java
> /org/apache/solr/parser/QueryParser.jj, what is the workflow to generate
> the new Java code?
>
>
> Thanks
> Nawab
>
> On Fri, Jul 21, 2017 at 7:33 PM, Nawab Zada Asad Iqbal <khi...@gmail.com>
> wrote:
>
>> ok,  I see there is an `ant javacc` target in some folders, e.g.
>>
>> 1) lucene-solr/solr/build/solr/src-export/solr/core
>> 2) lucene-solr/lucene/queryparser
>>
>> Both of them use different parser files. I am interested in the
>> QueryParser at path:
>> lucene-solr/solr/core/src/java/org/apache/solr/parser/QueryParser.jj
>>
>> this apparently is getting dropped at:  lucene-solr/solr/build/solr/sr
>> c-export/solr/core/src/java/org/apache/solr/parser/QueryParser.jj
>>
>> However, I am not sure what target drops it!
>>
>>
>> Nawab
>>
>>
>>
>>
>> On Fri, Jul 21, 2017 at 7:12 PM, Nawab Zada Asad Iqbal <khi...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I know that we can make changes in the language by editing
>>> QueryParser.jj, however, how does it get generated into java code? Is there
>>> any ant target?
>>> 'compile' doesn't seem to generate java code for my changes (e.g.,
>>> adding lower case logical operators).
>>>
>>>
>>> Regards
>>> Nawab
>>>
>>
>>
>

Reply via email to