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 6124005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:04:58+00:00 2026-05-23T16:04:58+00:00

I have a CakePHP 1.3 application connecting to Solr 3.3 search. There are two

  • 0

I have a CakePHP 1.3 application connecting to Solr 3.3 search.

There are two documents with the same attributes except for their lat/lon. The doc with closer lat/lon was entered second (higher id) but with the bost from geodist() I expect it to appear first. Actual behavior is doc with closer lat/lon appears second. Here’s the array the PHP Solr service hands back to my app:

protected '_rawResponse' => string '{
    "responseHeader":{
        "status":0,
        "QTime":0,
        "params":{
            "start":"0",
            "q":"beethoven eroica",
            "sfield":"lat_lon",
            "pt":"45.3306,-122.5290",
            "bf":"recip(geodist(),1,1000,1000)",
            "json.nl":"map",
            "wt":"json",
            "rows":"10",
            "version":"1.4"
        }
    },
    "response":{
        "numFound":7,
        "start":0,
        "docs":[{
            "id":"2",
            "title":"Symphony No 3, Eroica",
            "composer":"Beethoven, Ludwig van",
            "publisher":"Schott Musik International",
            "location":"Seattle, WA",
            "lat_lon":"47.6115,-122.3343"
        },{
            "id":"28",
            "title":"Symphony No 3, Eroica",
            "composer":"Beethoven, Ludwig'... (length=1418)

That second doc (with id=28) has lat/lon that match the “pt” value in the query.

What am I doing wrong?

  • 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-23T16:04:59+00:00Added an answer on May 23, 2026 at 4:04 pm

    I added defType=dismax and now the results are sorted as expected.

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

Sidebar

Related Questions

I have built an application in CakePHP that lists businesses. There are about 2000
I'm developing a application with CakePHP, and I have two layouts: one for the
I have a cakePHP application with an advanded search section. When a user applys
I'm trying to link two (and more) models in a CakePHP application. I have
I'm building a prototype search application using CakePHP and I have a search controller
I have two issues with my CakePHP application (its my first one in CakePHP).
I have a cakephp application, and in the add.ctp view there is a date-time
I have a cakePHP application that is pulling data from two different databases, which
So I have this one CakePHP web application that I'm trying to refactor. There
I have a cakePhp application built, and now I'm creating a simple blog based

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.