Adding customize fields

Sillawat Kim sillawat at gmail.com
Thu Nov 24 10:47:14 EST 2016


ok, I understood now. new field must contain "_value". i.e. "Geo":{"
Sector_city":{"_value":"TestCity"}}.



On Wed, Nov 23, 2016 at 11:15 PM, Sillawat Kim <sillawat at gmail.com> wrote:

> Hi Dan,
>
> I deleted all keys in Redis and I called curl -i 'http://localhost:7557/
> devices/?query=%7B%22summary.wlanSsid%22%3A%22HUAWEI-WiFi%
> 22%7D&projection=Geo.Sector_city' to API and it returns
>
> {"_id":"00259E-HG8045A-485754432C0AB057","Geo":{"
> Sector_city":"TestCity"},"summary.sectorcity":"TestCity"}
>
> I tried to call API with query "Geo.Sector_city=TestCity" but it does not
> return a result.
>
> Geo.Sector_city is a customised field that I added it in Devices
> collection in Mongo DB.
>
> Is there any action that I need to do for using a query with
> Geo.Sector_city? Can you advise, please?
>
> Thank you in advance.
>
>
> On Tue, Nov 22, 2016 at 8:17 PM, Sillawat Kim <sillawat at gmail.com> wrote:
>
>> Thank you. May I have an example about modify data model please? I tried
>> to search it. but I have no luck.
>>
>> On Mon, Nov 21, 2016 at 11:39 PM, Dan Morphis <dan at milkcarton.com> wrote:
>>
>>> Sure, but you have to populate that value externally, and also
>>> invalidate the redis cache for that entry.
>>>
>>> A much easier way is to use tags. We assign the management IP via DHCP
>>> based upon location of the device. Because of this I can automatically tag
>>> the device with its city. You might not be able to do it automatically, but
>>> manually tagging the city name to the device will be much easier than
>>> trying to update the object model and populating the data externally (and
>>> clearing the redis cache for the cpe).
>>>
>>>
>>> [image: Inline image 1]
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.genieacs.com
>>> http://lists.genieacs.com/mailman/listinfo/users
>>>
>>>
>>
>>
>> --
>> Regards,
>> Sillawat Kim
>>
>
>
>
> --
> Regards,
> Sillawat Kim
>



-- 
Regards,
Sillawat Kim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20161124/7acae865/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 18604 bytes
Desc: not available
URL: <http://lists.genieacs.com/pipermail/users/attachments/20161124/7acae865/attachment-0001.png>


More information about the Users mailing list