Hi Christina,

Thank you for your quick response. When I was running the CLI from
"vxquery/vxquery-cli/target/appassembler/bin" it gives a "file not found
exception".

Exception in thread "main" java.io.FileNotFoundException: File
'vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-1/showIndexes.xq'
does not exist
at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:299)
at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:1711)
at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:1734)
at org.apache.vxquery.cli.VXQuery.slurp(VXQuery.java:367)
at org.apache.vxquery.cli.VXQuery.executeQuery(VXQuery.java:212)
at org.apache.vxquery.cli.VXQuery.runQueries(VXQuery.java:191)
at org.apache.vxquery.cli.VXQuery.execute(VXQuery.java:167)
at org.apache.vxquery.cli.VXQuery.main(VXQuery.java:128)

When running from vxquery main directory, it works.

However, I tried queries with arguments that I mentioned before (such as
showAST, showQuery, compileOnly) and none of them outputted relevant
results. According to my opinion, this happens because "opts & indexOpts"
both variables have same object reference. Thus when user passes options,
those are always overridden by those "false values". Is that so? I would be
grateful if you can kindly look into this matter.

Thanks and Regards,

*Erandi Ganepola*
Undergraduate
BSc. Management and Information Technology (IT Sp.)
University of Kelaniya, Sri Lanka

<https://www.linkedin.com/in/erandiganepola/>
<https://github.com/erandiganepola>   <https://twitter.com/erandiganepola>

On Fri, Jul 28, 2017 at 8:49 PM, christina pavlopoulou <[email protected]>
wrote:

> Hello Erandi,
>
> every time that we run a query from the command line, we, also, run
> automatically a showIndexes query so that we know
> if there is or not an index for the specific collection of the query.
> Since, the showIndexes query is executed only for storing
> some index metadata and we do not need to print any results, we wanted to
> make it run as fast as possible. Thus, we turned off a few
> unnecessary options.
>
> However, now that we will have your work, I think that we will not need
> that second query for each query that we run.
>
> Christina
>
> On 7/28/2017 6:57 AM, Erandi Ganepola wrote:
>
>> Hi All,
>>
>> In VXQuery CLI class constructor[1] two variables (opts & indexOpts) are
>> used to assign command line options that are sent by the user. Both
>> variables have same object reference. But using indexOpts, some command
>> line options' (such as showAST, showQuery, compileOnly) values are always
>> set to false without considering user's options. Is there any particular
>> purpose for doing this?
>>
>> [1]
>> https://github.com/apache/vxquery/blob/master/vxquery-cli/
>> src/main/java/org/apache/vxquery/cli/VXQuery.java#L94
>>
>> Thanks and Regards,
>>
>> *Erandi Ganepola*
>> Undergraduate
>> BSc. Management and Information Technology (IT Sp.)
>> University of Kelaniya, Sri Lanka
>>
>> <https://www.linkedin.com/in/erandiganepola/>
>> <https://github.com/erandiganepola>   <https://twitter.com/erandiganepola
>> >
>>
>>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
>

Reply via email to