Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find-Item : date range search on Solr results in error #1107

Closed
michaellwest opened this issue May 10, 2019 · 3 comments
Closed

Find-Item : date range search on Solr results in error #1107

michaellwest opened this issue May 10, 2019 · 3 comments
Assignees
Labels
area-commands Involves functions and cmdlets. bug Oops! Sorry for the inconvenience.
Projects
Milestone

Comments

@michaellwest
Copy link
Member

michaellwest commented May 10, 2019

Expected Behavior

The following script to run without error:

$criteria = @(
 @{
    Field = "__smallcreateddate"
    Filter = "InclusiveRange"
    Value = [datetime[]]@([datetime]"01/01/2018", [datetime]::Today)
  }
)

$props = @{
  Index = "sitecore_master_index"
  Criteria = $criteria
  First = 15
}

Find-Item @props

Actual Behavior

Running the query results in an error with the search provider is Solr. Lucene appears to work fine.

ManagedPoolThread #7 20:20:01 INFO Solr Query - ?q=__smallcreateddate_tdt:[20190430 TO 20190509]&rows=0&fq=_indexname:(sitecore_master_index)
ManagedPoolThread #7 20:20:01 ERROR Solr Error : ["Invalid Date String:'20190430'"] - Query attempted: [__smallcreateddate_tdt:[20190430 TO 20190509]]

@michaellwest michaellwest added this to the 5.x milestone May 10, 2019
@michaellwest michaellwest added area-commands Involves functions and cmdlets. bug Oops! Sorry for the inconvenience. labels May 10, 2019
@michaellwest michaellwest self-assigned this May 10, 2019
@michaellwest
Copy link
Member Author

Issue corrected with #1106.

@michaellwest
Copy link
Member Author

Added a file to test:

Cognifide.PowerShell.dll.zip

@michaellwest
Copy link
Member Author

michaellwest commented May 10, 2019

Appears to work as expected for Lucene and Solr. Tested on 8.2.x.

ManagedPoolThread #0 20:37:42 INFO Solr Query - ?q=__smallcreateddate_tdt:[2019-04-28T05:00:00Z TO 2019-05-09T05:00:00Z]&rows=0&fq=_indexname:(sitecore_master_index)
ManagedPoolThread #0 20:37:43 INFO Solr Query - ?q=__smallcreateddate_tdt:[2019-04-28T05:00:00Z TO 2019-05-09T05:00:00Z]&start=0&rows=15&fq=_indexname:(sitecore_master_index)

@michaellwest michaellwest added this to Done in 5.1 May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-commands Involves functions and cmdlets. bug Oops! Sorry for the inconvenience.
Projects
No open projects
5.1
  
Done
Development

No branches or pull requests

1 participant