On Tue, Jan 27, 2015 at 8:11 AM, Andrea Aime <andrea.a...@geo-solutions.it>
wrote:

> On Tue, Jan 27, 2015 at 4:01 PM, Justin Deoliveira <jdeol...@gmail.com>
> wrote:
>
>> Right, this also came up in a thread on geoserver users. The current
>>> design is by sponsor spec, but towards the end of the development I also
>>> would have liked to have something more generic, where you would specify
>>> a name and a SOLR filter to go with it... it was just going to take too
>>> much time to develop it along with a user interface to go with it.
>>>
>>> I see. Not sure what you had in mind for ui but I was thinking this
>> would just boil down to another text field and perhaps a dropdown to choose
>> the mapping mode.
>>
>
> Yeah,  for having "everything as a single layer" this will work.
> The UI I had in mind was in line with sql views, where you have a "create
> new feature type" link, give it a name, a CQL/SOLR query, a selection of
> attributes.
>

Right. That would make a lot of sense. While I don't think I need that
immediately I'll run it up the chain of command see if there is interest in
that.

>
>
>>
>>
>>> I also did not think that adding an attribute to select the layers
>>> ownership would have been such a problem, SOLR has ways to add an
>>> attribute to all documents, and set its value, and documents are
>>> unstructured anyways. So... is the problem an issue of search efficiency?
>>>
>>
>> A couple of problems. First is I am working with customers that have very
>> large indexes, some more complex than others with index clustering, etc...
>> so we want to avoid having them do any sort of mass update, and updating
>> there ingestion pipelines to add the new attribute to new documents, etc...
>> then is also the question of how to handle documents in multiple layers?
>> Multi-values attributes perhaps, but I think it gets more complex pretty
>> quickly.
>>
>> Second is the static nature of it. We don't know ahead of time what types
>> of searches people are going to run so we can't really organize the
>> documents into layers ahead of time. Instead we'll be leaning on the
>> viewparams feature that is already there.
>>
>
> I see.
>
>
>>
>>>
>>>> The approach i am thinking of is to add a "MappingStrategy" interface
>>>> that would encapsulate how documents in the index are mapped to features.
>>>> Given the unstructured nature of document storage in lucene I imagine this
>>>> interface could prove useful in order to support additional future mapping
>>>> strategies.
>>>>
>>>
>>> Wondering again if this might affect how filters should be encoded, and
>>> if MappingStrategy should have a say in the filter capabilties, or given
>>> a chance to alter the filter, or split it in a encodable/not encodable
>>> part.
>>>
>>
>> Yeah, thought about that and we could definitely add filter capabilities
>> to the new interface. One issue though. Filter capabilities are advertised
>> by a datastore globally for the datastore.  A single document may have
>> fields with different types, that may have different native filtering
>> capabilities. Not sure how we handle that... take the union of all filter
>> capabilities?
>>
>
> Uh... that's going to be loads of fun... not sure what to do about it
> honestly. One would need a new type of splitter, one that takes a
> capabilities per attribute.
>

Yeah, nasty indeed. For now I was thinking of just leaving what is there
for filter capabilities since it's valid with the new bbox type.  And
perhaps revisit when we come across such a situation. What I can do for now
is at least delegate creation of the filter encoder to the new strategy.

>
>
>>
>>>
>>>>
>>>> The exisitng mapping strategy would of course remain the default and
>>>> while I was planning to add a few additional data store parameters to
>>>> control the mapping configuration it will remain 100% backward compatible
>>>> (important for geoserver users who already have data store configurations
>>>> out there).
>>>>
>>>
>>> Yep, that would work. I am wondering, the code in GeoServer relies on
>>> the current mapping strategy also at the level of attribute
>>> selection, there is dedicated GUI for it.
>>> How will the new mapping strategy fit into it? Like will the GUI just
>>> gets disabled because the newer mapping strategy just
>>> picks the attributes it likes internally?
>>>
>>> I was thinking that the attribute selection would remain orthogonal to
>> the mapping strategy being used. Or am I missing something? At least of the
>> mapping strategy I plan to implement I don't need to "pre-select" any
>> attributes. But I guess this is something that we could add to the new
>> interface.
>>
>
> Oh ok, so the mapping strategy would be mostly choosing what's inside a
> certain layer (the documents matching it), and not something that
> selects/transforms attributes
> like in app-schema? Sorry, when I heard mapping I though you were talking
> about something like app-schema mapping.
>
> Maybe you could choose a different name? Like uh... ContentStrategy?
> Anyways, not a big deal, as long as it
> has a descriptive javadoc you can call it what you want (no, not WWW
> please!).
>

Haha. Darn, I thought www would be perfect :) But yeah, mapping here might
be a misleading term. I'll think on it but ContentStrategy will work for
now.

So... seems like we have general consensus on the approach so i'll start
banging out some code and come back for a review when I have something.
Thanks again Andrea!

>
> Cheers
> Andrea
>
>
> --
> ==
> GeoServer Professional Services from the experts! Visit
> http://goo.gl/NWWaa2 for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax: +39 0584 1660272
> mob: +39  339 8844549
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> *AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
>
> Le informazioni contenute in questo messaggio di posta elettronica e/o
> nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
> loro utilizzo è consentito esclusivamente al destinatario del messaggio,
> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
> darcene notizia via e-mail e di procedere alla distruzione del messaggio
> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
> utilizzarlo per finalità diverse, costituisce comportamento contrario ai
> principi dettati dal D.Lgs. 196/2003.
>
>
>
> The information in this message and/or attachments, is intended solely for
> the attention and use of the named addressee(s) and may be confidential or
> proprietary in nature or covered by the provisions of privacy act
> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
> Code).Any use not in accord with its purpose, any disclosure, reproduction,
> copying, distribution, or either dissemination, either whole or partial, is
> strictly forbidden except previous formal approval of the named
> addressee(s). If you are not the intended recipient, please contact
> immediately the sender by telephone, fax or e-mail and delete the
> information in this message that has been received in error. The sender
> does not give any warranty or accept liability as the content, accuracy or
> completeness of sent messages and accepts no responsibility  for changes
> made after they were sent or for other risks which arise as a result of
> e-mail transmission, viruses, etc.
>
> -------------------------------------------------------
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to