Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

SharePoint 2013 Caml Query option will not work for Large List

$
0
0

Hi All,

I have created a CAML Query on a SharePoint 2013 list, that uses <OR> option.  This query works correctly, as long as the number of records is less than 5000.   However, when I attempt to create the same Caml Query on a list with more than 5000 items, I receive the following message:

“The filter is this view uses ‘or’ to combine the indexed column with the next column in the view.  This will not be efficient in this large list and you should consider changing the filter.”  

If you accept the changes, the list displays the message that the 5000 list view threshold has been reached.  Even when the filter is set and I know should only show 12 items.

Both columns are indexed.

Any thoughts?  Is this a bugs?  Or is there something else I need to do?  Is there a work around?

The WHERE statement is as follows:

<Where>

         <Or>

                <Contains>

                                <FieldRef Name="LastName"/>

                                <Value Type="Text">{LastName_Param}</Value>

</Contains>

                <Eq>

                                <FieldRef Name="ShowAll"/>

                                <Value Type="Text">{LastName_Param}</Value>

                </Eq>

</Or>

</Where>

The "ShowAll" field has the same value ("zxzxzxzx") for all items and filter variable is defaulted to the same value.  Therefore if the filter is blank the variable matches the "ShowAll" field and all records should be displayed.  But when the filter is set, only the items that contain the set value should be displayed.

Thanks,

Dwayne


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>