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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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
>>> [email protected]
>>> http://lists.genieacs.com/mailman/listinfo/users
>>>
>>>
>>
>>
>> --
>> Regards,
>> Sillawat Kim
>>
>
>
>
> --
> Regards,
> Sillawat Kim
>



-- 
Regards,
Sillawat Kim
_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users

Reply via email to