You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by "Dan Smith (JIRA)" <ji...@apache.org> on 2017/05/23 22:01:04 UTC

[jira] [Commented] (GEODE-2975) Attributes are not validated in lucene xml configuration

    [ https://issues.apache.org/jira/browse/GEODE-2975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16021949#comment-16021949 ] 

Dan Smith commented on GEODE-2975:
----------------------------------

I did a quick experiment. It looks like we would do validation, except we are not actually finding the lucene schema.

All of the xml examples I find say that the lucene schema location should be this :http://geode.apache.org/schema/lucene/lucene-1.0.xsd

However, that url does not actually resolve the lucene schema. I found a copy of that schema here,  but this seems incorrect: http://geode.apache.org/schema/cache/lucene-1.0.xsd

So first off, We should update the website to put the schema in the correct location.

However we have an optimization to avoid downloading the xsd from the website every time. We use the GeodeEntityResolver to read the xsds from the classpath instead. Unfortunately, it looks like the XSD is also in the wrong location in our source tree. The GeodeEntityResolver is going to look for the file in /META-INF/schemas/geode.apache.org/schema/lucene/lucene-1.0.xsd. But the lucene schema is in  /META-INF/schemas/geode.apache.org/lucene/lucene-1.0.xsd. So we need to fix the location of the xsd in the source checkout.

If we fix either of these things, then the validation should work as expected.
Unfortunately, the 

> Attributes are not validated in lucene xml configuration
> --------------------------------------------------------
>
>                 Key: GEODE-2975
>                 URL: https://issues.apache.org/jira/browse/GEODE-2975
>             Project: Geode
>          Issue Type: Bug
>          Components: lucene
>            Reporter: Barry Oglesby
>
> No exception is thrown for a lucene xml configuration missing a required attribute.
> No exception is thrown for a lucene xml configuration including an unknown attribute.
> If a {{lucene:field}} element is defined like below, no exception is thrown for the invalid attribute called {{namexx}} and no exceptio is thrown because the required attribute called {{name}} is not included.
> {noformat}
> <lucene:field namexx="Agency"/>
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)