Re: issue creating a custom index/schema

2016-05-09 Thread Alex De la rosa
Ok, definitely I won't need that spatialContextFactory:

Solr supports polygons via JTS Topology Suite, which does not come with
Solr. It's a JAR file that you need to put on Solr's classpath (but not via
the standard solrconfig.xml mechanisms). If you intend to use those shapes,
set this attribute to
org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory. (note:
prior to Solr 6, the "org.locationtech.spatial4j" part was
"com.spatial4j.core").

So I believe I can go on with your snippet. Thanks!
Alex

On Mon, May 9, 2016 at 9:26 PM, Alex De la rosa 
wrote:

> Thank Jorge,
>
> I was reading the documentation of Solr and seems they changed the
> spatialContextFactory in their latest version:
>
>
> https://cwiki.apache.org/confluence/display/solr/Spatial+Search#SpatialSearch-SpatialRecursivePrefixTreeFieldType(abbreviatedasRPT)
>
> This should work according to new documentation:
>
>  class="solr.SpatialRecursivePrefixTreeFieldType"
> spatialContextFactory="org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory"
> distErrPct="0.025" maxDistErr="0.09" units="degrees" />
>
> Although maybe is not needed to add the spatialContentFactory as per your
> example...
>
> Thanks,
> Alex
>
> On Mon, May 9, 2016 at 9:23 PM, Jorge Garrido gomez <
> jorge.garr...@hovanetworks.com> wrote:
>
>> Hello Alex,
>>
>> We solved the issue using the Spatial:
>>
>> > class="solr.SpatialRecursivePrefixTreeFieldType"
>> distErrPct="0.025"
>> maxDistErr="0.09"
>> units="degrees"
>>  />
>>
>> We use that definition for the field and works perfectly, I hope this can be 
>> helpful, if you want more info maybe we can help you
>>
>>
>> Thank you! :-)
>>
>>
>>
>> On May 9, 2016, at 12:06 PM, Alex De la rosa 
>> wrote:
>>
>> Ok, i solved the issues for the datatypes "int", "string", but still
>> getting errors for the "location_rpt":
>>
>> > class="solr.SpatialRecursivePrefixTreeFieldType"
>> spatialContextFactory="com.spatial4j.core.context.jts.JtsSpatialContextFactory"
>> distErrPct="0.025" maxDistErr="0.09" units="degrees" />
>>
>> 2016-05-09 19:03:56.798 [error] <0.588.0>@yz_index:core_create:287
>> Couldn't create index leaders_b:
>> {ok,"500",[{"Content-Type","text/html;charset=ISO-8859-1"},{"Cache-Control","must-revalidate,no-cache,no-store"},{"Content-Length","11214"}],<<"\n\n> http-equiv=\"Content-Type\" content=\"text/html;
>> charset=ISO-8859-1\"/>\nError 500
>> {msg=com/vividsolutions/jts/geom/CoordinateSequenceFactory,trace=java.lang.NoClassDefFoundError:
>> com/vividsolutions/jts/geom/CoordinateSequenceFactory\n\tat
>> java.lang.Class.getDeclaredConstructors0(Native Method)\n\tat
>> java.lang.Class.privateGetDeclaredConstructors(Class.java:2595)\n\tat
>> java.lang.Class.getConstructor0(Class.java:2895)\n\tat
>> java.lang.Class.newInstance(Class.java:354)\n\tat
>> com.spatial4j.core.context.SpatialContextFactory.makeSpatialContext(SpatialContextFactory.java:96)\n\tat
>> org.apache.solr.schema.AbstractSpatialFieldType.init(AbstractSpatialFieldType.java:107)\n\tat
>> org.apache.solr.schema.AbstractSpatialPrefixTreeFieldType.init(AbstractSpatialPrefixTreeFieldType.java:43)\n\tat
>> org.apache.solr.schema.SpatialRecursivePrefixTreeFieldType.init(SpatialRecursivePrefixTreeFieldType.java:37)\n\tat
>> org.apache.solr.schema.FieldType.setArgs(FieldType.java:165)\n\tat
>> org.apache.solr.schema.FieldTypePluginLoader.init(FieldTypePluginLoader.java:141)\n\tat
>> org.apache.solr.schema.FieldTypePluginLoader.init(FieldTypePluginLoader.java:43)\n\tat
>> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:190)\n\tat
>> org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:468)\n\tat
>> org.apache.solr.schema.IndexSchema.init(IndexSchema.java:166)\n\tat
>> org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:55)\n\tat
>> org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:69)\n\tat
>> org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:559)\n\tat
>> org.apache.solr.core.CoreContainer.create(CoreContainer.java:597)\n\tat
>> org.apache.solr.handler.admin.CoreAdminHandler.handleCreateAction(CoreAdminHandler.java:509)\n\tat
>> org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:152)\n\tat
>> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)\n\tat
>> org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:732)\n\tat
>> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:268)\n\tat
>> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:217)\n\tat
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)\n\tat
>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)\n\tat
>> 

Re: issue creating a custom index/schema

2016-05-09 Thread Alex De la rosa
i see... that part of the schema was written in another code block in the
documentation:



will try with that :) thanks

Alex

On Mon, May 9, 2016 at 8:48 PM, Vitaly <13vitam...@gmail.com> wrote:

> You don't have this type under . The failure is about "int" because
> it's the first one encountered in the list of fields.
>
> Regards,
> Vitaly
>
> On Mon, May 9, 2016 at 7:16 PM, Alex De la rosa 
> wrote:
>
>> Hi there,
>>
>> I'm trying to create a custom index as seen at
>> http://docs.basho.com/riak/kv/2.1.4/developing/usage/search-schemas and
>> I'm getting the following errors in my log:
>>
>> 2016-05-09 18:08:05.229 [error] <0.588.0>@yz_index:core_create:287
>> Couldn't create index scores: {ok,"400",[{"Content-Type","application/xml;
>> charset=UTF-8"},{"Transfer-Encoding","chunked"}],<<"> encoding=\"UTF-8\"?>\n\n> name=\"status\">40026> name=\"error\">Error CREATEing SolrCore 'scores': *Unable
>> to create core: scores Caused by: Unknown fieldType 'int' specified on
>> field points*400\n\n">>}
>>
>> 2016-05-09 18:08:43.096 [error] <0.9673.1>@yz_index:sync_index:464 Solr
>> core error after trying to create index scores:
>> <<"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
>> *Unknown fieldType 'int' specified on field points*. Schema file is
>> /var/lib/riak/yz/scores/./leaders.xml">>
>>
>> is saying the type "int" is unknown!! any ideas why? this is the schema
>> i'm uploading:
>>
>> 
>> 
>>   
>>
>>> stored="false"/>
>>> stored="true"/>
>>> stored="true"/>
>>> stored="true"/>
>>> stored="true"  multiValued="false" required="true"/>
>>> stored="false" multiValued="false"/>
>>> stored="false" multiValued="false"/>
>>> stored="false" multiValued="false"/>
>>> stored="false" multiValued="false"/>
>>> stored="true"  multiValued="false"/>
>>> stored="true"  multiValued="false"/>
>>> stored="true"  multiValued="false"/>
>>> stored="false" multiValued="false"/>
>>   
>>
>>   _yz_id
>>
>>   
>> > class="solr.SpatialRecursivePrefixTreeFieldType"
>> spatialContextFactory="com.spatial4j.core.context.jts.JtsSpatialContextFactory"
>> distErrPct="0.025" maxDistErr="0.09" units="degrees" />
>> > multiValued="true" class="solr.StrField" />
>> 
>> > sortMissingLast="true" />
>>   
>> 
>>
>> Thanks,
>> Alex
>>
>> ___
>> riak-users mailing list
>> riak-users@lists.basho.com
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: issue creating a custom index/schema

2016-05-09 Thread Alex De la rosa
Ok, i solved the issues for the datatypes "int", "string", but still
getting errors for the "location_rpt":



2016-05-09 19:03:56.798 [error] <0.588.0>@yz_index:core_create:287 Couldn't
create index leaders_b:
{ok,"500",[{"Content-Type","text/html;charset=ISO-8859-1"},{"Cache-Control","must-revalidate,no-cache,no-store"},{"Content-Length","11214"}],<<"\n\n\nError 500
{msg=com/vividsolutions/jts/geom/CoordinateSequenceFactory,trace=java.lang.NoClassDefFoundError:
com/vividsolutions/jts/geom/CoordinateSequenceFactory\n\tat
java.lang.Class.getDeclaredConstructors0(Native Method)\n\tat
java.lang.Class.privateGetDeclaredConstructors(Class.java:2595)\n\tat
java.lang.Class.getConstructor0(Class.java:2895)\n\tat
java.lang.Class.newInstance(Class.java:354)\n\tat
com.spatial4j.core.context.SpatialContextFactory.makeSpatialContext(SpatialContextFactory.java:96)\n\tat
org.apache.solr.schema.AbstractSpatialFieldType.init(AbstractSpatialFieldType.java:107)\n\tat
org.apache.solr.schema.AbstractSpatialPrefixTreeFieldType.init(AbstractSpatialPrefixTreeFieldType.java:43)\n\tat
org.apache.solr.schema.SpatialRecursivePrefixTreeFieldType.init(SpatialRecursivePrefixTreeFieldType.java:37)\n\tat
org.apache.solr.schema.FieldType.setArgs(FieldType.java:165)\n\tat
org.apache.solr.schema.FieldTypePluginLoader.init(FieldTypePluginLoader.java:141)\n\tat
org.apache.solr.schema.FieldTypePluginLoader.init(FieldTypePluginLoader.java:43)\n\tat
org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:190)\n\tat
org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:468)\n\tat
org.apache.solr.schema.IndexSchema.init(IndexSchema.java:166)\n\tat
org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:55)\n\tat
org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:69)\n\tat
org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:559)\n\tat
org.apache.solr.core.CoreContainer.create(CoreContainer.java:597)\n\tat
org.apache.solr.handler.admin.CoreAdminHandler.handleCreateAction(CoreAdminHandler.java:509)\n\tat
org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:152)\n\tat
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:732)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:268)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:217)\n\tat
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)\n\tat
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)\n\tat
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)\n\tat
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)\n\tat
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)\n\tat
org.eclipse.jetty.server.Server.handle(Server.java:368)\n\tat
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)\n\tat
org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)\n\tat
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)\n\tat
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)\n\tat
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.ja...">>}
Anyone knows how to fix it?

Thanks,
Alex

On Mon, May 9, 2016 at 8:50 PM, Alex De la rosa 
wrote:

> i see... that part of the schema was written in another code block in the
> documentation:
>
>  positionIncrementGap="0"/>
>
> will try with that :) thanks
>
> Alex
>
> On Mon, May 9, 2016 at 8:48 PM, Vitaly <13vitam...@gmail.com> wrote:
>
>> You don't have this type under . The failure is about "int"
>> because it's the first one encountered in the list of fields.
>>
>> Regards,
>> Vitaly
>>
>> On Mon, May 9, 2016 at 7:16 PM, Alex De la rosa 
>> wrote:
>>
>>> Hi there,
>>>
>>> I'm trying to create a custom index as seen at
>>> http://docs.basho.com/riak/kv/2.1.4/developing/usage/search-schemas 

Re: issue creating a custom index/schema

2016-05-09 Thread Vitaly
You don't have this type under . The failure is about "int" because
it's the first one encountered in the list of fields.

Regards,
Vitaly

On Mon, May 9, 2016 at 7:16 PM, Alex De la rosa 
wrote:

> Hi there,
>
> I'm trying to create a custom index as seen at
> http://docs.basho.com/riak/kv/2.1.4/developing/usage/search-schemas and
> I'm getting the following errors in my log:
>
> 2016-05-09 18:08:05.229 [error] <0.588.0>@yz_index:core_create:287
> Couldn't create index scores: {ok,"400",[{"Content-Type","application/xml;
> charset=UTF-8"},{"Transfer-Encoding","chunked"}],<<" encoding=\"UTF-8\"?>\n\n name=\"status\">40026 name=\"error\">Error CREATEing SolrCore 'scores': *Unable
> to create core: scores Caused by: Unknown fieldType 'int' specified on
> field points*400\n\n">>}
>
> 2016-05-09 18:08:43.096 [error] <0.9673.1>@yz_index:sync_index:464 Solr
> core error after trying to create index scores:
> <<"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
> *Unknown fieldType 'int' specified on field points*. Schema file is
> /var/lib/riak/yz/scores/./leaders.xml">>
>
> is saying the type "int" is unknown!! any ideas why? this is the schema
> i'm uploading:
>
> 
> 
>   
>
> stored="false"/>
> stored="true"/>
> stored="true"/>
> stored="true"/>
> stored="true"  multiValued="false" required="true"/>
> stored="false" multiValued="false"/>
> stored="false" multiValued="false"/>
> stored="false" multiValued="false"/>
> stored="false" multiValued="false"/>
> stored="true"  multiValued="false"/>
> stored="true"  multiValued="false"/>
> stored="true"  multiValued="false"/>
> stored="false" multiValued="false"/>
>   
>
>   _yz_id
>
>   
>  class="solr.SpatialRecursivePrefixTreeFieldType"
> spatialContextFactory="com.spatial4j.core.context.jts.JtsSpatialContextFactory"
> distErrPct="0.025" maxDistErr="0.09" units="degrees" />
>  multiValued="true" class="solr.StrField" />
> 
>  />
>   
> 
>
> Thanks,
> Alex
>
> ___
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


issue creating a custom index/schema

2016-05-09 Thread Alex De la rosa
Hi there,

I'm trying to create a custom index as seen at
http://docs.basho.com/riak/kv/2.1.4/developing/usage/search-schemas and I'm
getting the following errors in my log:

2016-05-09 18:08:05.229 [error] <0.588.0>@yz_index:core_create:287 Couldn't
create index scores: {ok,"400",[{"Content-Type","application/xml;
charset=UTF-8"},{"Transfer-Encoding","chunked"}],<<"\n\n40026Error CREATEing SolrCore 'scores': *Unable
to create core: scores Caused by: Unknown fieldType 'int' specified on
field points*400\n\n">>}

2016-05-09 18:08:43.096 [error] <0.9673.1>@yz_index:sync_index:464 Solr
core error after trying to create index scores:
<<"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
*Unknown fieldType 'int' specified on field points*. Schema file is
/var/lib/riak/yz/scores/./leaders.xml">>

is saying the type "int" is unknown!! any ideas why? this is the schema i'm
uploading:



  
   
   
   
   
   
   
   
   
   
   
   
   
   
   
  

  _yz_id

  




  


Thanks,
Alex
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com