Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-users] Assistance with creating attribute indexes?

Aaron,

You are correct:  "true" (which is an alias for "join" for backward
compatibility with previous versions of the syntax), "full", "join", and
"none" are all valid selections.  Here's a quick description of the
differences among them:

"full":  The value for Accumulo entries in the attribute-index table
will be an encoded copy of the full SimpleFeature, meaning that a scan
of the attribute-index table is sufficient to fetch all of the
qualifying records.

"join":  The value for Accumulo entries in the attribute-index table
will be the SimpleFeature's ID, meaning that a second-phase scan of the
records table (indexed by ID) is necessary to fetch all of the
qualifying records.

"none":  As you expect, this skips adding entries to the attribute-index
table entirely.

Thanks!

Sincerely,
  -- Chris


On Thu, 2015-04-23 at 15:42 +0000, Aaron Simmons wrote:
> Thanks so much for the quick reply!
> 
> I noticed that you use the syntax 'index=full' in this line:
> "Who:String:index=full"
> 
> I was trying to use "index=true" / "index=false" based on what I had gleaned from various examples--this one in particular from https://github.com/locationtech/geomesa/blob/accumulo1.5.x/1.x/geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geotools/SimpleFeatureTypes.scala line 456:
> /*
>      Valid specs can have attributes that look like the following:
>         "id:Integer:opt1=v1:opt2=v2,*geom:Geometry:srid=4326,ct:List[String]:index=true,mt:Map[String,Double]:index=false"
> */
> 
>   Is "index=full" the correct syntax to use?
> 
> ..
> 
> I just tried following the code in SpecParser -- I stumbled on this:
> https://github.com/locationtech/geomesa/blob/accumulo1.5.x/1.x/geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/stats/IndexCoverage.scala
> 
> I believe those values of "full", "join", "none" are valid for the ":index=____" .. is that correct?
> 
> -Aaron
> 
> ________________________________________
> From: geomesa-users-bounces@xxxxxxxxxxxxxxxx <geomesa-users-bounces@xxxxxxxxxxxxxxxx> on behalf of Chris Eichelberger <cne1x@xxxxxxxx>
> Sent: Thursday, April 23, 2015 11:25 AM
> To: Geomesa User discussions
> Subject: Re: [geomesa-users] Assistance with creating attribute indexes?
> 
> Aaron,
> 
> This is a great question.  You are right about using the
> SimpleFeatureTypes class; that is the easiest way.  I checked the
> quick-start tutorial, and found that we hadn't updated it to show using
> secondary indexes, so I made that change this morning, and pushed it up.
> The relevant lines to reference as a working example are here:
> 
> https://github.com/geomesa/geomesa-quickstart/blob/master/src/main/java/org/geomesa/QuickStart.java#L126-L136
> 
> I hope this helps.  If not, or if you continue to encounter issues,
> please just let me know.
> 
> Thanks!
> 
> Sincerely,
>   -- Chris
> 
> 
> On Thu, 2015-04-23 at 06:02 +0000, Aaron Simmons wrote:
> > What is the correct way to create a geomesa table with attribute
> > indexes specified on one or more fields?
> >
> >
> >
> > I have found that using ***DataUtilities.createType( ... ) seems to
> > ignore all of my ":index=true" e.g.
> > Field1:String:index=true,Field2:String:index=false,Field3:String:index=true
> >
> >
> > Then I figured out that using +++SimpleFeatureTypes​.createType( ... )
> > seemed to work better.  But then my code for adding records ran into a
> > bizarre run-time error: Feature '[name]' has not been initialized.
> > Please call 'createSchema' first.
> >
> >
> >
> > ***DataUtilities => org.geotools.data.DataUtilities
> >
> >
> > +++SimpleFeatureTypes => org.locationtech.geomesa.utils.geotools.SimpleFeatureTypes
> >
> >
> >
> > ..
> >
> >
> >
> > What is the proper way to create a new geomesa table, specifying one
> > or more attributes [besides geotemporal] to be indexed?  I am trying
> > to take advantage of the *_attr_idx table, but it's not clicking for
> > me.
> >
> >
> >
> > Thanks.
> >
> >
> >
> > -Aaron
> >
> >
> >
> > _______________________________________________
> > geomesa-users mailing list
> > geomesa-users@xxxxxxxxxxxxxxxx
> > To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> > http://www.locationtech.org/mailman/listinfo/geomesa-users
> 
> 
> _______________________________________________
> geomesa-users mailing list
> geomesa-users@xxxxxxxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> http://www.locationtech.org/mailman/listinfo/geomesa-users
> _______________________________________________
> geomesa-users mailing list
> geomesa-users@xxxxxxxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> http://www.locationtech.org/mailman/listinfo/geomesa-users




Back to the top