You are viewing limited content. For full access, please sign in.

Question

Question

SDK returns different number of documents in search than client

asked on October 7, 2014

Hi All,

 

I am playing with RA search and for this search string in the client I get 4674 results but from the sdk I get 493.

{lf:created > "09/01/2014"} & {lf:name="*",type="D"}

I am using windows authentication in the application to connect to Laserfiche so I should have all the same permissions in both.

The search code is from the toolkit tutorial on searching.

I added a wait until the searchstatus is set to done before getting the result count.

any ideas why the difference?

Andrew

0 0

Answers

APPROVED ANSWER
replied on October 7, 2014 Show version history

Your RA Search is looking for documents created after September 1, 2014. Perhaps the search you're testing in the Client is returning documents created after January 9, 2014. Can you see if that is the case?

1 0
SELECTED ANSWER
replied on October 7, 2014

Advanced mupperty the date in the client was the same as the application so the client was looking at 09th January 2014 not 01st September 2014.

Sorry guys.

 

Andrew 

1 0

Replies

replied on October 7, 2014 Show version history

Could the issue be with the date format? Try setting the DateFormat property before running the search. If the date format should be DMY, then you can add the following line prior to running your search

Search.DateFormat = "DMY"

 

1 0
replied on October 7, 2014

Is your Client set to "resolve shortcuts" (Tools\Options\Search\Results Display)?

0 0
replied on October 7, 2014

That option is not selected.

I turned it on and it is still searching will update when it finishes.

 

Andrew

0 0
replied on October 7, 2014

With resolve shortcuts I now get 5729 entries I reran the search with resolve shortcuts off and get 4674 entries.

 

Andrew

0 0
replied on October 7, 2014

Added the date format and still get the same 493 results so just to check I have the correct code.

 

'Search for document
 Dim lfsearch As New Search(mySess)
lfsearch.DateFormat = "DMY"

Dim searchString As String = "{lf:created > ""01/09/2014""} & {lf:name=""*"",type=""D""}"
lfsearch.Command = searchString
lfsearch.Run()

While lfsearch.Status <> SearchStatus.Done
     System.Threading.Thread.Sleep(5000)
End While

Dim ss As SearchStatistics = lfsearch.GetSummaryStats()
Me.TBSearchHits.Text = ss.DocumentCount

Andrew

0 0
APPROVED ANSWER
replied on October 7, 2014 Show version history

Your RA Search is looking for documents created after September 1, 2014. Perhaps the search you're testing in the Client is returning documents created after January 9, 2014. Can you see if that is the case?

1 0
replied on October 8, 2014

Have experience this before. SDK does the search in US date format while if you have your locale set as UK in client, it will do the search in UK date format. Hence, the results are differnet.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.