Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 287315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:42:52+00:00 2026-05-12T05:42:52+00:00

I’m having some serious issues using Zend_Lucene and foreign characters like åäö. These issues

  • 0

I’m having some serious issues using Zend_Lucene and foreign characters like åäö. These issues appear both when the index is created and when it’s queried. I’ve tried both iso-8859-1 and utf-8.

ISO-8859-1

The query that doesn’t work looks like “+_area:skåne“. With Zend_Lucene I’m getting no matches, but if I run this query in Luke I get many matching docuements.

The index contains 20 fields. The “_area” field is added with the following syntax:

$doc->addField(Zend_Search_Lucene_Field::keyword('_area', strtolower($item['area']), 'iso-8859-1')); 

I am using the Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive analyzer.

While running indexing, the error message below appeared sometimes (the documents indexed were randomly selected from DB with iso-8859-1 encoding)

Notice: iconv(): Detected an illegal character in input string in TextNum.php.

This was “solved” by checking if $this->_input is empty, as it seemed that this caused the notices. Note: The weird query results were a pre-existing condition.

When I search keyword fields using foreign characters I receive the error above, but when I search text fields it behaves differently. Then it generates about a hundred of the error below.

Notice: Undefined offset: 1996 in \Zend\Search\Lucene\Search\Query\MultiTerm.php on line 472

But it produces what looks like a correct result set! On a side note, this second query doesn’t generate any results in Luke.

UTF-8

I’ve also tried UTF-8 because, to my knowledge, Zend_Lucene uses it internally. Since the data set is ISO-8859-1, I convert it using utf8_encode. But the indexing produces the following errors.

Notice: Undefined offset: 266979 in
\Zend\Search\Lucene\Index\SegmentInfo.php
on line 632

Notice: Trying to get property of
non-object in
\Zend\Search\Lucene\Index\SegmentMerger.php
on line 196

Notice: Trying to get property of
non-object in
\Zend\Search\Lucene\Index\SegmentMerger.php
on line 200

Notice: Undefined index: in
\Zend\Search\Lucene\Index\SegmentWriter.php
on line 231

Notice: Trying to get property of
non-object in
\Zend\Search\Lucene\Index\SegmentWriter.php
on line 231

Notice: Undefined offset: 250595 in
\Zend\Search\Lucene\Index\SegmentInfo.php
on line 2020

Notice: Trying to get property of
non-object in
\Zend\Search\Lucene\Index\SegmentInfo.php
on line 2020

Notice: Undefined index: in
\Zend\Search\Lucene\Index\SegmentWriter.php
on line 465
…


So. Can someone please shed some light? 🙂 I believe (after days of googling) that I’m not the only one experiencing this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:42:52+00:00Added an answer on May 12, 2026 at 5:42 am

    I suggest you try using a UTF-8 compatible text analyzer.
    It looks like the analyzer you are using destroys the non-ASCII characters.
    You should make sure that the text is input properly, and that it reaches Lucene in the proper format.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I need to clean up various Word 'smart' characters in user input, including but
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.