<div dir="ltr">ok, I understood now. new field must contain "_value". i.e. "<span style="font-size:12.8px">Geo":{"</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">Sector_city":{"_value":"TestCity"}}.</span><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 23, 2016 at 11:15 PM, Sillawat Kim <span dir="ltr"><<a href="mailto:sillawat@gmail.com" target="_blank">sillawat@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Dan,<div><br></div><div>I deleted all keys in Redis and I called curl -i '<a href="http://localhost:7557/devices/?query=%7B%22summary.wlanSsid%22%3A%22HUAWEI-WiFi%22%7D&projection=Geo.Sector_city" target="_blank">http://localhost:7557/<wbr>devices/?query=%7B%22summary.<wbr>wlanSsid%22%3A%22HUAWEI-WiFi%<wbr>22%7D&projection=Geo.Sector_<wbr>city</a>' to API and it returns</div><div><br></div><div><div>{"_id":"00259E-HG8045A-<wbr>485754432C0AB057","Geo":{"<wbr>Sector_city":"TestCity"},"<wbr>summary.sectorcity":"TestCity"<wbr>}</div></div><div><br></div><div>I tried to call API with query "Geo.Sector_city=TestCity" but it does not return a result. </div><div><br></div><div>Geo.Sector_city is a customised field that I added it in Devices collection in Mongo DB.<br></div><div><br></div><div>Is there any action that I need to do for using a query with Geo.Sector_city? Can you advise, please?</div><div><br></div><div>Thank you in advance.</div><div><br></div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Tue, Nov 22, 2016 at 8:17 PM, Sillawat Kim <span dir="ltr"><<a href="mailto:sillawat@gmail.com" target="_blank">sillawat@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you. May I have an example about modify data model please? I tried to search it. but I have no luck.</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_3677072449037935497h5">On Mon, Nov 21, 2016 at 11:39 PM, Dan Morphis <span dir="ltr"><<a href="mailto:dan@milkcarton.com" target="_blank">dan@milkcarton.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_3677072449037935497h5"><div dir="ltr">Sure, but you have to populate that value externally, and also invalidate the redis cache for that entry.<div><br></div><div>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).</div><div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><img src="cid:ii_15887bfc655bdd5a" alt="Inline image 1" width="316" height="287"><br></div></div>
<br></div></div><span>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.genieacs.com" target="_blank">Users@lists.genieacs.com</a><br>
<a href="http://lists.genieacs.com/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.genieacs.com/mail<wbr>man/listinfo/users</a><br>
<br></span></blockquote></div><span class="m_3677072449037935497HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_3677072449037935497m_5171759596320012405gmail_signature" data-smartmail="gmail_signature">Regards,<div>Sillawat Kim</div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_3677072449037935497gmail_signature" data-smartmail="gmail_signature">Regards,<div>Sillawat Kim</div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Regards,<div>Sillawat Kim</div></div>
</div>