-
-
Notifications
You must be signed in to change notification settings - Fork 249
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
[BUG] I found a problem with indexing field with value 0 #3900
Comments
dkd-kaehm
added a commit
that referenced
this issue
Dec 3, 2023
AbstractIndexer::addDocumentFieldsFromTyposcript() disallows any PHPs empty value. This change adds explicit checks for disallowed values: * null * empty string * empty array Fixes: #3900
@dkd-kaehm |
dkd-kaehm
added a commit
that referenced
this issue
Dec 4, 2023
AbstractIndexer::addDocumentFieldsFromTyposcript() disallows any PHPs empty value. This change adds explicit checks for disallowed values: * null * empty string * empty array Fixes: #3900
dkd-kaehm
added a commit
to dkd-kaehm/ext-solr
that referenced
this issue
Mar 7, 2024
This change is a follow-up of TYPO3-Solr#3901, which was introduced to allow following values in Apache Solr fields: * numeric 0 * boolean false which lead to countless-unwanted numeric fields with 0 value in Apache Solr documents. The background: TypoScript can return the strings only, and all empty values lead to numeric 0. This change tries to avoid mispelled casting of numbers and lets the `AbstractIndexer::ensureFieldValueType()` return PHPs `null` if the value isn't a number. Relates: TYPO3-Solr#3900, TYPO3-Solr#3901
dkd-friedrich
pushed a commit
that referenced
this issue
Mar 7, 2024
This change is a follow-up of #3901, which was introduced to allow following values in Apache Solr fields: * numeric 0 * boolean false which lead to countless-unwanted numeric fields with 0 value in Apache Solr documents. The background: TypoScript can return the strings only, and all empty values lead to numeric 0. This change tries to avoid mispelled casting of numbers and lets the `AbstractIndexer::ensureFieldValueType()` return PHPs `null` if the value isn't a number. Relates: #3900, #3901
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I have a field in the queue configuration with _boolS the value inside the field is 1 or 0 as boolean, the problem is the field was not added to the document when the field value is 0,
The problem inside
ApacheSolrForTypo3\Solr\IndexQueue\AbstractIndexer
with the functionaddDocumentFieldsFromTyposcript
the problem comes from the condition !empty()Expected behavior
It should also add the document to the value when the value field is 0
Screenshots
Used versions (please complete the following information):
The text was updated successfully, but these errors were encountered: