SelectMany on Index has missing field values #15271
-
Hi Guys, I want to ask question about select many on index. I have a legacy code that I have to maintain here, so I would rather not to make any change in the index below. But, if I have to do it, then that's fine. My problem is, when utilizing this index on the backend, the filter works. However, the output collection had been missing fields when I instantiated them, specifically the "transactionAction" related properties. LocationId, LocationName and TimeLogged in Result object have default value (default DateTime, null, null) instead of the actual ones from Inventory object. I would expect that this query would simply map the transactionAction into Result object, but apparently it is not. What could possibly went wrong? Or, what should I fix/modify in order to get the transactionAction property values propagated to Result object? On the other hand, when I query the Inventory Class, I can still get the whole values in Inventory object, including the TransactionActions, as expected.
One solution that I could think of is to modify Inventory.TransactionActions input a simple class instead of dictionary. That way, the mapping is simpler in the index. The new class could have { BuyAction, and SellAction } with the same type. However, the downside of it, it's not completely flat anymore on the index result object. maybe that's why the initial design was using dictionary and it could be flatten during indexing |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hi Can you send us a small project or unit test that reproduces the issue? |
Beta Was this translation helpful? Give feedback.
-
Have you tried setting this in the index? StoreAllFields(FieldStorage.Yes); |
Beta Was this translation helpful? Give feedback.
Have you tried setting this in the index? StoreAllFields(FieldStorage.Yes);