[Xapian-devel] About search priority based on field

Scott Zhang macromarship at gmail.com
Mon May 2 14:10:03 BST 2011


Hello.
  About compile Xapian with mingw, I asked and compiled on mailing
list few days ago. Please check my solution below.
  Thanks for the link. I am looking into it.

Regards.
Scott
================================================================
Hello. All.
  Finally get xapian compiled with mingw on windows 2003.
Following changes need to be made.
1. When configure
do this.
configure CXXFLAGS=-D__MSVCRT_VERSION__==0x0601

2. Modify common/closeform.cc
Line 100:
change
maxfd = static_cast<int>(sysconf(_SC_OPEN_MAX));
to
maxfd = 65535;//static_cast<int>(sysconf(_SC_OPEN_MAX));

because sysconf is not implemented in mingw.

3. modify net/progclient.cc
on Line 25: add
#include <stdio.h>

because sprintf is not defined here.

4. modify net/tcpserver.cc
on line 25. add
on Line 25: add
#include <stdio.h>

because sprintf is not defined here.

Then make && make install

I notice there are some strip function is not success because the path
is incorrect. But it doesn't matter.
Then we can test examples.


Regards.
Scott




On Mon, May 2, 2011 at 4:35 PM, Olly Betts <olly at survex.com> wrote:
> On Fri, Apr 29, 2011 at 03:35:06PM +0800, Scott Zhang wrote:
>>     I used lucene and solr in last 3 years. Recently I want to add
>> search in my desktop C++ application on windows. CLucene is hard to
>> compile using mingw, took my whole day without success. Xapian took my
>> whole day either but at last I got it compiled. It works fine.
>
> Hmm, I'd have hoped Xapian would compile cleanly with mingw - it
> certainly used to.  What were the issues?  It would be good to
> patch them up.
>
>>   Is it possible to search over all field by give priority Title >
>> Author > Publisher?
>
> Yes, see:
>
> http://trac.xapian.org/wiki/FAQ/ExtraWeight
>
> Cheers,
>    Olly
>



More information about the Xapian-devel mailing list