#716 closed enhancement (fixed)
Python Examples to Java
Reported by: | Aakash | Owned by: | Aakash |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Xapian-bindings (Java) | Version: | 1.2.23 |
Severity: | minor | Keywords: | Java, Examples |
Cc: | Blocked By: | ||
Blocking: | Operating System: | All |
Description
Converting the python examples in the "Getting Started" (http://getting-started-with-xapian.readthedocs.org/en/latest/practical_example/index.html) documentation to Java. The examples to be converted are
- index1.py
- search1.py
- delete1.py
- index_ranges.py, index_filters.py, index_sorting.py
- search_filters.py, search_ranges.py, search_sorting.py
Python example code: https://github.com/xapian/xapian-docsprint/tree/master/code/python
Attachments (3)
Change History (6)
by , 9 years ago
Attachment: | Index1.java added |
---|
comment:1 by , 9 years ago
Hi, just had a look at these. They're going in the right direction, but they really need to work identically to the python versions (so for instance no swapped argument orders), and have identical namings (because of how the user guide build and include system works). It's probably easiest if you drop these into a PR against the user guide (or just one to start off with would probably be even easier). Then we can discuss individual lines more easily.
It's also worth paying attention to consistency: some of your comments start with a leading space, some do not. I'd favour always having one: it looks neater.
comment:2 by , 9 years ago
The make invocation I'm using to build documentation using Java is as follows:
make clean html SPHINXOPTS=-tjava \ JAVAC='javac -classpath ../build/xapian-bindings/java/built/xapian_jni.jar:./code/java/' \ JAVA='java -Djava.library.path=../build/xapian-bindings/java/.libs -classpath ../build/xapian-bindings/java/built/xapian_jni.jar:./code/java/'
That's with the user manual repo checked out in the same directory as a 'build' directory where I built Xapian (and hence the bindings). Xapian is installed in /usr/local as normal. Ideally at some point we'd make the build system figure this out itself, but for now that's the way to do it. (You also have to comment out line 309 or thereabouts of conf.py, where it does sys.exit(1)
if there are "bad characters" in the environment variables. We'll have to fix that properly at some point as well.)
comment:3 by , 2 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This was merged back in 2016:
commit 91f8cf7057db61da6633e9fdefb9859e76007a6d Merge: 77093a80 054e7b20 Author: Olly Betts <ojwbetts@gmail.com> Date: Mon Dec 19 00:44:11 2016 +1300 Merge pull request #12 from mkash32/javaexamples Add Java Examples
Java implementation of index1.py